Index: LayoutTests/fast/dom/HTMLImageElement/image-sizes-js-innerhtml.html |
diff --git a/LayoutTests/fast/dom/HTMLImageElement/image-sizes-js-innerhtml.html b/LayoutTests/fast/dom/HTMLImageElement/image-sizes-js-innerhtml.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..b119abf88aab3f9b21758c3aa2d3a361c2ec123b |
--- /dev/null |
+++ b/LayoutTests/fast/dom/HTMLImageElement/image-sizes-js-innerhtml.html |
@@ -0,0 +1,23 @@ |
+<html> |
+<head> |
+<script src="../../../resources/js-test.js"></script> |
+<script> |
+ if (window.testRunner) |
+ testRunner.dumpAsText(); |
+ |
+ addEventListener("DOMContentLoaded", function() { |
+ if (window.testRunner && sessionStorage.pageReloaded) |
+ testRunner.dumpResourceRequestCallbacks(); |
+ window.testdiv = document.createElement("div"); |
+ window.testdiv.innerHTML = '<img id="foo" src="resources/blue-100-px-square.png" srcset="../../hidpi/resources/image-set-1x.png 200w, ../../hidpi/resources/image-set-2x.png 400w, resources/image-set-4x.png 800w">'; |
+ }, false); |
+ addEventListener("load", function() { |
+ shouldBe('window.testdiv.children[0].currentSrc', '"resources/image-set-4x.png"'); |
+ }, false); |
+</script> |
+</head> |
+ |
+<body id="body"> |
+ <img id="foo"> |
+</body> |
+</html> |