Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / HTMLImageElement / image-picture-invalid.html
blob18a878ad180387aa68bf639f55888a3a11c5e229
1 <!DOCTYPE html>
2 <script src="../../../resources/js-test.js"></script>
3 <script src="resources/currentSrcHelper.js"></script>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 addEventListener("load", function() {
9 shouldBe('document.getElementById("canary").clientWidth', '75');
10 shouldBe('currentSrcFileName("canary")', '"blue_rect.jpg?0"');
11 shouldBe('document.getElementById("div_end_picture").clientWidth', '800');
12 shouldBe('currentSrcFileName("div_end_picture")', '"image-set-2x.png?2"');
13 shouldBe('document.getElementById("div_multiple_end").clientWidth', '800');
14 shouldBe('currentSrcFileName("div_multiple_end")', '"image-set-2x.png?2"');
15 shouldBe('document.getElementById("source_in_div").clientWidth', '75');
16 shouldBe('currentSrcFileName("source_in_div")', '"blue_rect.jpg"');
17 shouldBe('document.getElementById("not_in_picture").clientWidth', '75');
18 shouldBe('currentSrcFileName("not_in_picture")', '"blue_rect.jpg"');
19 }, false);
20 </script>
21 <!-- A canary image to see that the test is actually working -->
22 <img id="canary" src="resources/blue_rect.jpg?0">
23 <!-- Invalid nesting tests -->
24 <!-- In the following tests, nesting shouldn't mess up the selection algorithm -->
25 <picture>
26 <picture>
27 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
28 resources/image-set-4x.png?2 1600w">
29 <div>
30 </picture>
31 </div>
32 <img id="div_end_picture" src="resources/blue_rect.jpg">
33 </picture>
34 </picture>
35 <picture>
36 <div>
37 </picture>
38 </picture>
39 </picture>
40 </div>
41 <source sizes="800px" srcset="../../hidpi/resources/image-set-1x.png?2 400w, ../../hidpi/resources/image-set-2x.png?2 800w,
42 resources/image-set-4x.png?2 1600w">
43 <img id="div_multiple_end" src="resources/blue_rect.jpg">
44 </picture>
45 <!-- In the following tests, nesting messes up the selection algorithm -->
46 <picture>
47 <div>
48 <picture>
49 <div>
50 <source sizes="400px" srcset="resources/base-image1.png?4 200w, resources/base-image3.png?4 400w, resources/base-image2.png?4 800w">
51 </div>
52 <img id="source_in_div" src="resources/blue_rect.jpg">
53 </picture>
54 </div>
55 </picture>
56 <picture>
57 <div>
58 <picture>
59 <div>
60 <source sizes="400px" srcset="resources/base-image1.png?5 200w, resources/base-image3.png?5 400w, resources/base-image2.png?5 800w">
61 <img id="not_in_picture" src="resources/blue_rect.jpg">
62 </div>
63 </picture>
64 </div>
65 </picture>