Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / hidpi / image-srcset-intrinsic-size.html
blob68c636e433443f237869379cf4c9ee5c8cffb817
1 <html>
2 <head>
3 <script>
4 window.targetScaleFactor = 2;
5 </script>
6 <script src="resources/srcset-helper.js"></script>
7 <script src="../../resources/js-test.js"></script>
8 <script>
9 addEventListener("load", function() {
10 shouldBe('document.getElementById("foo").clientWidth', '200');
11 shouldBe('document.getElementById("foo2").clientWidth', '400');
12 shouldBe('document.getElementById("foo3").clientWidth', '100');
13 shouldBe('document.getElementById("foo4").clientWidth', '200');
14 shouldBe('document.getElementById("foo5").clientWidth', '200');
15 }, false);
16 </script>
17 </head>
19 <body id="body">
20 <div>
21 This test passes if the images are all displayed with appropriate dimensions.
22 </div>
23 <img id="foo" srcset="resources/blue-100-px-square.png 1x, resources/deleteButton.png 3x, resources/green-400-px-square.png 2x">
24 <br>
25 <img id="foo2" src="resources/green-400-px-square.png">
26 <br>
27 <img id="foo3" srcset="resources/srcset.svg 2x">
28 <br>
29 <img id="foo4" srcset="resources/blue-100-px-square.png 0.5x">
30 <br>
31 <img id="foo5" src="resources/srcset.svg">
32 </body>
33 </html>