OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../../resources/js-test.js"></script> |
| 3 <img id="our_image" src="resources/blue_rect.jpg"> |
| 4 <script> |
| 5 var jsTestIsAsync = true; |
| 6 var img; |
| 7 |
| 8 onload = function() { |
| 9 |
| 10 img = document.getElementById("our_image"); |
| 11 shouldNotBe('img.currentSrc.indexOf("blue_rect.jpg")', '-1'); |
| 12 img.onload = function() { |
| 13 shouldNotBe('img.currentSrc.indexOf("image-set-4x")', '-1'); |
| 14 finishJSTest(); |
| 15 } |
| 16 img.srcset = "resources/image-set-4x.png 120w"; |
| 17 |
| 18 img.onerror = function() { |
| 19 testFailed('Image should have loaded'); |
| 20 }; |
| 21 } |
| 22 </script> |
OLD | NEW |