зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1523562 [wpt PR 14882] - Fix preload tests failing on wpt.fyi dashboard, a=testonly
Automatic update from web-platform-tests Fix preload tests failing on wpt.fyi dashboard verifyNumberOfDownloads only counts resource timing entries with transferSize > 0, so it doesn't count if the resource came from a cache. (See https://bugzilla.mozilla.org/show_bug.cgi?id=1222633#c38 for background why we have it.) link-header-preload-nonce.html and link-header-preload-srcset.tentative.html were failing on wpt.fyi dashboard because they have used the same subresource URLs as other tests, and preloaded resources from the disk cache. This patch adds unique query parameters to these URLs so that they don't conflict with other tests. Bug: 922343 Change-Id: I7fd88530f5fdd83ed2a22d2e2893cc446debd036 Reviewed-on: https://chromium-review.googlesource.com/c/1411963 Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#623157} -- wpt-commits: 1311556c4c29627e3d1093dfbe7cfc7ed1901bbe wpt-pr: 14882
This commit is contained in:
Родитель
8c956f48f3
Коммит
fceff34217
|
@ -9,8 +9,8 @@
|
|||
<script nonce="abc">
|
||||
window.addEventListener('load', t.step_func(function() {
|
||||
verifyPreloadAndRTSupport();
|
||||
verifyNumberOfDownloads("resources/dummy.js?without-nonce", 0);
|
||||
verifyNumberOfDownloads("resources/dummy.js?with-nonce", 1);
|
||||
verifyNumberOfDownloads("resources/dummy.js?from-header&without-nonce", 0);
|
||||
verifyNumberOfDownloads("resources/dummy.js?from-header&with-nonce", 1);
|
||||
t.done();
|
||||
}));
|
||||
</script>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Content-Security-Policy: script-src 'nonce-abc'
|
||||
Link: </preload/resources/dummy.js?without-nonce>;rel=preload;as=script
|
||||
Link: </preload/resources/dummy.js?with-nonce>;rel=preload;as=script;nonce=abc
|
||||
Link: </preload/resources/dummy.js?from-header&without-nonce>;rel=preload;as=script
|
||||
Link: </preload/resources/dummy.js?from-header&with-nonce>;rel=preload;as=script;nonce=abc
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
<script>
|
||||
window.addEventListener("load", t.step_func(function() {
|
||||
verifyPreloadAndRTSupport();
|
||||
verifyNumberOfDownloads('resources/square.png?1x', 1);
|
||||
verifyNumberOfDownloads('resources/square.png?2x', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?3x', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?base', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?200', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?400', 1);
|
||||
verifyNumberOfDownloads('resources/square.png?800', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?150', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?300', 1);
|
||||
verifyNumberOfDownloads('resources/square.png?600', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&1x', 1);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&2x', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&3x', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&base', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&200', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&400', 1);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&800', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&150', 0);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&300', 1);
|
||||
verifyNumberOfDownloads('resources/square.png?from-header&600', 0);
|
||||
t.done();
|
||||
}));
|
||||
</script>
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
Link: <resources/square.png?1x>; rel=preload; as=image; imagesrcset="resources/square.png?2x 2x, resources/square.png?3x 3x"
|
||||
Link: <resources/square.png?base>; rel=preload; as=image; imagesrcset="resources/square.png?200 200w, resources/square.png?400 400w, resources/square.png?800 800w"; imagesizes=400px
|
||||
Link: <resources/square.png?base>; rel=preload; as=image; imagesrcset="resources/square.png?150 150w, resources/square.png?300 300w, resources/square.png?600 600w"; imagesizes="(min-width: 300px) 300px, 150px"
|
||||
Link: <resources/square.png?from-header&1x>; rel=preload; as=image; imagesrcset="resources/square.png?from-header&2x 2x, resources/square.png?from-header&3x 3x"
|
||||
Link: <resources/square.png?from-header&base>; rel=preload; as=image; imagesrcset="resources/square.png?from-header&200 200w, resources/square.png?from-header&400 400w, resources/square.png?from-header&800 800w"; imagesizes=400px
|
||||
Link: <resources/square.png?from-header&base>; rel=preload; as=image; imagesrcset="resources/square.png?from-header&150 150w, resources/square.png?from-header&300 300w, resources/square.png?from-header&600 600w"; imagesizes="(min-width: 300px) 300px, 150px"
|
||||
|
|
Загрузка…
Ссылка в новой задаче