Update web-platform-tests to revision 9c2bea6dac36e36ba1f489d10c2be42160d8f34f

This commit is contained in:
WPT Sync Bot 2018-11-27 21:07:27 -05:00
parent 482923cec2
commit 5c371dd958
459 changed files with 10717 additions and 834 deletions

View file

@ -0,0 +1,31 @@
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/preload/resources/preload_helper.js"></script>
<script>
var t = async_test('Makes sure that a dynamically added preload with imagesrcset works');
</script>
<body>
<script>
t.step(function() {
verifyPreloadAndRTSupport();
var link = document.createElement("link");
link.as = "image";
link.rel = "preload";
link.href = "resources/square.png?default";
link.imageSrcset = "resources/square.png?200 200w, resources/square.png?400 400w, resources/square.png?800 800w";
link.imageSizes = "400px";
link.onload = t.step_func(function() {
t.step_timeout(function() {
verifyNumberOfDownloads("resources/square.png?default", 0);
verifyNumberOfDownloads("resources/square.png?200", 0);
verifyNumberOfDownloads("resources/square.png?400", 1);
verifyNumberOfDownloads("resources/square.png?800", 0);
t.done();
}, 0);
});
document.body.appendChild(link);
});
</script>
<script src="resources/dummy.js?pipe=trickle(d5)&dynamic-adding-preload"></script>
</body>

View file

@ -4,7 +4,7 @@
<script src="/resources/testharnessreport.js"></script>
<script src="/preload/resources/preload_helper.js"></script>
<script>
var t = async_test('Makes sure that Link headers preload images with (experimental) srcset/imgsizes attributes.');
var t = async_test('Makes sure that Link headers preload images with (experimental) imagesrcset/imagesizes attributes.');
</script>
<body>
<script src="resources/dummy.js?pipe=trickle(d3)&link-header-preload-srcset"></script>

View file

@ -1,3 +1,3 @@
Link: <resources/square.png?1x>; rel=preload; as=image; srcset="resources/square.png?2x 2x, resources/square.png?3x 3x"
Link: <resources/square.png?base>; rel=preload; as=image; srcset="resources/square.png?200 200w, resources/square.png?400 400w, resources/square.png?800 800w"; imgsizes=400px
Link: <resources/square.png?base>; rel=preload; as=image; srcset="resources/square.png?150 150w, resources/square.png?300 300w, resources/square.png?600 600w"; imgsizes="(min-width: 300px) 300px, 150px"
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"