Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / loading / preload-picture-sizes-2x.html
blob5aca364d6e283b601e0b1b74ce9600deef406321
1 <html>
2 <head>
3 <script src="/js-test-resources/js-test.js"></script>
4 <script>
5 window.targetScaleFactor = 2;
6 </script>
7 <script src="../resources/srcset-helper.js"></script>
8 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=100"></script>
9 <script src="resources/picture-preload-helper.js"></script>
10 </head>
11 <body>
12 <script>
13 if (window.testRunner)
14 testRunner.dumpAsText();
15 shouldBeTrue("internals.isPreloaded('resources/image2.png');");
16 for (var i = 1; i <= 9; ++i) {
17 loadFromSource2x(i);
19 shouldBeFalse("internals.isPreloaded('resources/dup-image1.png?7');");
20 shouldBeFalse("internals.isPreloaded('resources/dup-image1.png?8');");
21 shouldBeFalse("internals.isPreloaded('resources/dup-image2.png?8');");
22 shouldBeFalse("internals.isPreloaded('resources/dup-image3.png?8');");
23 shouldBeFalse("internals.isPreloaded('resources/preload-test.jpg?10');");
24 shouldBeTrue("internals.isPreloaded('resources/base-image1.png?10');");
25 shouldBeFalse("internals.isPreloaded('resources/base-image2.png?10');");
26 shouldBeFalse("internals.isPreloaded('resources/base-image3.png?10');");
28 </script>
29 <!-- Control group -->
30 <picture>
31 <source srcset="resources/image2.png">
32 <img src="preload-test.jpg?1">
33 </picture>
34 <!-- All permutations of src, srcset and sizes -->
35 <picture>
36 <source sizes="400px" srcset="resources/base-image1.png?1 200w, resources/base-image3.png?1 400w, resources/base-image2.png?1 800w">
37 <img src="preload-test.jpg?1">
38 </picture>
39 <picture>
40 <source srcset="resources/base-image1.png?2 200w, resources/base-image3.png?2 400w, resources/base-image2.png?2 800w" sizes="400px">
41 <img src="preload-test.jpg?2">
42 </picture>
43 <picture>
44 <source sizes="400px" srcset="resources/base-image1.png?3 200w, resources/base-image3.png?3 400w, resources/base-image2.png?3 800w">
45 <img src="preload-test.jpg?3">
46 </picture>
47 <picture>
48 <source sizes="400px" srcset="resources/base-image1.png?4 200w, resources/base-image3.png?4 400w, resources/base-image2.png?4 800w">
49 <img src="preload-test.jpg?4">
50 </picture>
51 <picture>
52 <source srcset="resources/base-image1.png?5 200w, resources/base-image3.png?5 400w, resources/base-image2.png?5 800w" sizes="400px">
53 <img src="preload-test.jpg?5">
54 </picture>
55 <picture>
56 <source srcset="resources/base-image1.png?6 200w, resources/base-image3.png?6 400w, resources/base-image2.png?6 800w" sizes="400px">
57 <img src="preload-test.jpg?6">
58 </picture>
59 <!-- Duplicate attributes -->
60 <picture>
61 <source srcset="resources/base-image1.png?7 200w, resources/base-image3.png?7 400w, resources/base-image2.png?7 800w" sizes="400px"
62 src="resources/dup-image1.png?7">
63 <img src="preload-test.jpg?7">
64 </picture>
65 <picture>
66 <source srcset="resources/base-image1.png?8 200w, resources/base-image3.png?8 400w, resources/base-image2.png?8 800w" sizes="400px"
67 srcset="resources/dup-image1.png?8 200w, resources/dup-image3.png?8 400w, resources/dup-image2.png?8 800w">
68 <img src="preload-test.jpg?8">
69 </picture>
70 <picture>
71 <source srcset="resources/base-image1.png?9 200w, resources/base-image3.png?9 400w, resources/base-image2.png?9 800w" sizes="400px"
72 sizes="800px">
73 <img src="preload-test.jpg?9">
74 </picture>
75 <!-- Sizes with 'x' descriptors -->
76 <picture>
77 <source srcset="resources/preload-test.jpg?10, resources/base-image1.png?10 2x, resources/base-image3.png?10 4x, resources/base-image2.png?10 8x" sizes="400px">
78 <img src="preload-test.jpg?10">
79 </picture>
80 </body>
81 </html>