Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / loading / preload-image-sizes.html
blobbf9df59802ebd1c86fb50c924cae5d146925ab0e
1 <html>
2 <head>
3 <script src="/js-test-resources/js-test.js"></script>
4 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script>
5 </head>
6 <body>
7 <script>
8 if (window.testRunner)
9 testRunner.dumpAsText();
10 shouldBeTrue("internals.isPreloaded('resources/image2.png');");
11 for (var i = 1; i <= 9; ++i) {
12 shouldBeFalse("internals.isPreloaded('resources/preload-test.jpg?" + i + "');");
13 shouldBeFalse("internals.isPreloaded('resources/base-image1.png?" + i + "');");
14 shouldBeFalse("internals.isPreloaded('resources/base-image2.png?" + i + "');");
15 shouldBeTrue("internals.isPreloaded('resources/base-image3.png?" + i + "');");
17 shouldBeFalse("internals.isPreloaded('resources/dup-image1.png?7');");
18 shouldBeFalse("internals.isPreloaded('resources/dup-image1.png?8');");
19 shouldBeFalse("internals.isPreloaded('resources/dup-image2.png?8');");
20 shouldBeFalse("internals.isPreloaded('resources/dup-image3.png?8');");
21 shouldBeTrue("internals.isPreloaded('resources/preload-test.jpg?10');");
22 shouldBeFalse("internals.isPreloaded('resources/base-image1.png?10');");
23 shouldBeFalse("internals.isPreloaded('resources/base-image2.png?10');");
24 shouldBeFalse("internals.isPreloaded('resources/base-image3.png?10');");
26 </script>
27 <!-- Control group -->
28 <img src="resources/image2.png">
29 <!-- All permutations of src, srcset and sizes -->
30 <img src="resources/preload-test.jpg?1" sizes="400px" srcset="resources/base-image1.png?1 200w, resources/base-image3.png?1 400w, resources/base-image2.png?1 800w">
31 <img src="resources/preload-test.jpg?2" srcset="resources/base-image1.png?2 200w, resources/base-image3.png?2 400w, resources/base-image2.png?2 800w" sizes="400px">
32 <img sizes="400px" src="resources/preload-test.jpg?3" srcset="resources/base-image1.png?3 200w, resources/base-image3.png?3 400w, resources/base-image2.png?3 800w">
33 <img sizes="400px" srcset="resources/base-image1.png?4 200w, resources/base-image3.png?4 400w, resources/base-image2.png?4 800w" src="resources/preload-test.jpg?4">
34 <img srcset="resources/base-image1.png?5 200w, resources/base-image3.png?5 400w, resources/base-image2.png?5 800w" src="resources/preload-test.jpg?5" sizes="400px">
35 <img srcset="resources/base-image1.png?6 200w, resources/base-image3.png?6 400w, resources/base-image2.png?6 800w" sizes="400px" src="resources/preload-test.jpg?6">
36 <!-- Duplicate attributes -->
37 <img srcset="resources/base-image1.png?7 200w, resources/base-image3.png?7 400w, resources/base-image2.png?7 800w" sizes="400px" src="resources/preload-test.jpg?7"
38 src="resources/dup-image1.png?7">
39 <img srcset="resources/base-image1.png?8 200w, resources/base-image3.png?8 400w, resources/base-image2.png?8 800w" sizes="400px" src="resources/preload-test.jpg?8"
40 srcset="resources/dup-image1.png?8 200w, resources/dup-image3.png?8 400w, resources/dup-image2.png?8 800w">
41 <img srcset="resources/base-image1.png?9 200w, resources/base-image3.png?9 400w, resources/base-image2.png?9 800w" sizes="400px" src="resources/preload-test.jpg?9"
42 sizes="800px">
43 <!-- Sizes with 'x' descriptors -->
44 <img srcset="resources/base-image1.png?10 2x, resources/base-image3.png?10 4x, resources/base-image2.png?10 8x" sizes="400px" src="resources/preload-test.jpg?10">
45 </body>
46 </html>