Index: LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html |
diff --git a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html |
similarity index 85% |
copy from LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html |
copy to LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html |
index 5d86cfc99350559b2312003c0aa8fb7956b414c8..03c1d200d771b7c92a2e5e70186fed3cd38a9121 100644 |
--- a/LayoutTests/fast/hidpi/image-srcset-change-dynamically-from-js-2x.html |
+++ b/LayoutTests/fast/hidpi/image-srcset-change-dynamically-src-first-2x.html |
@@ -1,20 +1,19 @@ |
<html> |
<head> |
<script> |
- if (window.testRunner) |
- testRunner.dumpResourceRequestCallbacks(); |
</script> |
<script src="resources/srcset-helper.js"></script> |
<script src="../../resources/js-test.js"></script> |
<script> |
function updateSrc() { |
var img = document.getElementById("foo"); |
- // srcset must be set first, otherwise 'src' is loaded as well |
- img.srcset = "resources/blue-100-px-square.png 1x, resources/green-400-px-square.png 2x"; |
img.src = "resources/blue-100-px-square.png" |
+ img.srcset = "resources/blue-100-px-square.png 1x, resources/green-400-px-square.png 2x"; |
} |
addEventListener("DOMContentLoaded", function() { |
+ if (window.testRunner && sessionStorage.pageReloaded) |
+ testRunner.dumpResourceRequestCallbacks(); |
updateSrc(); |
}, false); |
addEventListener("load", function() { |