OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../resources/js-test-pre.js"></script> |
| 4 <script> |
| 5 window.targetScaleFactor = 1; |
| 6 </script> |
| 7 <script src="../resources/srcset-helper.js"></script> |
| 8 <script src="http://127.0.0.1:8000/resources/slow-script.pl?delay=1000"></script
> |
| 9 </head> |
| 10 <body> |
| 11 <script> |
| 12 shouldBeFalse("internals.isPreloaded('resources/image1.png');"); |
| 13 shouldBeTrue("internals.isPreloaded('resources/base-image1.png');"); |
| 14 shouldBeTrue("internals.isPreloaded('resources/image2.png');"); |
| 15 </script> |
| 16 <div>This test passes if the fallback image (defined in the src attribute) is no
t preloaded, but the 1x version (defined in srcset) is, even |
| 17 when srcset is defined first.</div> |
| 18 <div>The second image is here to make sure isPreloaded is working properly</div> |
| 19 <img height="100" width="100" srcset="resources/base-image1.png 1x, resources/ba
se-image3.png 3x, resources/base-image2.png 2x" src="resources/preload-test.jpg"
> |
| 20 <img src="resources/image2.png"> |
| 21 </body> |
| 22 </html> |
| 23 |
OLD | NEW |