Index: LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html |
diff --git a/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html b/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a5aa67cf5dddc91cf0602d9dcf1b01d9ed4d4e50 |
--- /dev/null |
+++ b/LayoutTests/fast/hidpi/image-srcset-invalid-inputs-correct-src.html |
@@ -0,0 +1,21 @@ |
+<html> |
+<head> |
+<script src="resources/srcset-helper.js"></script> |
+<script src="../js/resources/js-test-pre.js"></script> |
+<script> |
+ if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ } |
+ |
+ addEventListener("load", function() { |
+ shouldBeTrue('document.getElementById("foo").clientWidth==200'); |
+ }, false); |
+</script> |
+</head> |
+ |
+<body id="body"> |
+ <div>This test passes if this img tag below is a green square regardless of the scale factor. It ensures that invalid inputs |
+ from srcset are ignored, and src is selected (since it's the only candidate left)</div> |
+ <img id="foo" src="resources/green-200-px-square.png" srcset="1x,, , , resources/blue-100-px-square.png 2px, 2x ,,"> |
+</body> |
+</html> |