Bug 1526643 [wpt PR 15129] - Fix remaining preload tests flaking on wpt.fyi, a=testonly
commit27d81ff0b9889f751d08b870b7b38e2f0bb52a15
authorKunihiko Sakamoto <ksakamoto@chromium.org>
Tue, 19 Feb 2019 14:38:42 +0000 (19 14:38 +0000)
committerJames Graham <james@hoppipolla.co.uk>
Tue, 26 Feb 2019 12:05:22 +0000 (26 12:05 +0000)
tree5181687dedd354516002d799f844b27410d9a809
parenta6fc3797b16270c6a865a47676edbdc80c3ceae7
Bug 1526643 [wpt PR 15129] - Fix remaining preload tests flaking on wpt.fyi, a=testonly

Automatic update from web-platform-tests
Fix remaining preload tests flaking on wpt.fyi

This is a follow-up to https://github.com/web-platform-tests/wpt/pull/15075.

https://crrev.com/c/1436777 successfully fixed the wpt.fyi flakiness
for link-header-preload-srcset.tentative.html and
link-header-preload-nonce.html. This patch fixes that for the remaining
preload tests.

- Use step_timeout instead of dummy.js?pipe=trickle, because
  dummy.js?pipe=trickle may be loaded from cache with no delay.
- Replace verifyNumberOfDownloads() with
  - verifyNumberOfResourceTimingEntries() if possible
  - A new helper function verifyLoadedAndNoDoubleDownload() that
    doesn't fail if the resource was already cached before running
    the test.

Bug: 922343
Change-Id: Ia9b7c4bd49dd76463df4607349fe4f935e5410d0
Reviewed-on: https://chromium-review.googlesource.com/c/1442020
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#629029}

--

wpt-commits: eb5aa0038ee7a938beabbe4c732a685af2581dbc
wpt-pr: 15129
20 files changed:
testing/web-platform/tests/mixed-content/imageset.https.sub.html
testing/web-platform/tests/preload/avoid-delaying-onload-link-preload.html
testing/web-platform/tests/preload/delaying-onload-link-preload-after-discovery.html
testing/web-platform/tests/preload/download-resources.html
testing/web-platform/tests/preload/dynamic-adding-preload-imagesrcset.tentative.html
testing/web-platform/tests/preload/dynamic-adding-preload-nonce.html
testing/web-platform/tests/preload/dynamic-adding-preload.html
testing/web-platform/tests/preload/link-header-on-subresource.html
testing/web-platform/tests/preload/link-header-preload-delay-onload.html
testing/web-platform/tests/preload/link-header-preload-nonce.html
testing/web-platform/tests/preload/link-header-preload-srcset.tentative.html
testing/web-platform/tests/preload/link-header-preload.html
testing/web-platform/tests/preload/onerror-event.html
testing/web-platform/tests/preload/onload-event.html
testing/web-platform/tests/preload/preload-csp.sub.html
testing/web-platform/tests/preload/preload-default-csp.sub.html
testing/web-platform/tests/preload/preload-with-type.html
testing/web-platform/tests/preload/resources/preload_helper.js
testing/web-platform/tests/preload/single-download-late-used-preload.html
testing/web-platform/tests/preload/single-download-preload.html