| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 window.targetScaleFactor = 2; | 4 window.targetScaleFactor = 2; |
| 5 </script> | 5 </script> |
| 6 <script src="resources/srcset-helper.js"></script> | 6 <script src="resources/srcset-helper.js"></script> |
| 7 <script src="../../resources/js-test.js"></script> | 7 <script src="../../resources/js-test.js"></script> |
| 8 <script> | 8 <script> |
| 9 addEventListener("load", function() { | 9 addEventListener("load", function() { |
| 10 shouldBe('document.getElementById("foo").clientWidth', '200'); | 10 shouldBeTrue('document.getElementById("foo").clientWidth==200'); |
| 11 shouldBe('document.getElementById("foo2").clientWidth', '400'); | 11 shouldBeTrue('document.getElementById("foo2").clientWidth==400'); |
| 12 shouldBe('document.getElementById("foo3").clientWidth', '100'); | 12 shouldBeTrue('document.getElementById("foo3").clientWidth==100'); |
| 13 shouldBe('document.getElementById("foo4").clientWidth', '200'); | 13 shouldBeTrue('document.getElementById("foo4").clientWidth==200'); |
| 14 shouldBe('document.getElementById("foo5").clientWidth', '200'); | |
| 15 }, false); | 14 }, false); |
| 16 </script> | 15 </script> |
| 17 </head> | 16 </head> |
| 18 | 17 |
| 19 <body id="body"> | 18 <body id="body"> |
| 20 <div> | 19 <div> |
| 21 This test passes if the images are all displayed with appropriate dimens
ions. | 20 This test passes if the images are all displayed with appropriate dimens
ions. |
| 22 </div> | 21 </div> |
| 23 <img id="foo" srcset="resources/blue-100-px-square.png 1x, resources/deleteB
utton.png 3x, resources/green-400-px-square.png 2x"> | 22 <img id="foo" srcset="resources/blue-100-px-square.png 1x, resources/deleteB
utton.png 3x, resources/green-400-px-square.png 2x"> |
| 24 <br> | 23 <br> |
| 25 <img id="foo2" src="resources/green-400-px-square.png"> | 24 <img id="foo2" src="resources/green-400-px-square.png"> |
| 26 <br> | 25 <br> |
| 27 <img id="foo3" srcset="resources/srcset.svg 2x"> | 26 <img id="foo3" srcset="resources/srcset.svg 2x"> |
| 28 <br> | 27 <br> |
| 29 <img id="foo4" srcset="resources/blue-100-px-square.png 0.5x"> | 28 <img id="foo4" src="resources/srcset.svg"> |
| 30 <br> | |
| 31 <img id="foo5" src="resources/srcset.svg"> | |
| 32 </body> | 29 </body> |
| 33 </html> | 30 </html> |
| OLD | NEW |