Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(157)

Unified Diff: LayoutTests/fast/dom/HTMLImageElement/image-sizes-js-innerhtml.html

Issue 236713005: Use SizesAttributeParser to get the right srcset resource (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@sizes_parser8
Patch Set: Fixed nits Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698