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

Unified Diff: LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero.html

Issue 305643006: Enable a srcset 0x descriptor (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase and unflake the layout test Created 6 years, 7 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
« no previous file with comments | « no previous file | LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero.html
diff --git a/LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero.html b/LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero.html
new file mode 100644
index 0000000000000000000000000000000000000000..164eae7e89cc87ddd88e0cdf4a2f755ef316cfd5
--- /dev/null
+++ b/LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+ window.targetScaleFactor = 2;
+</script>
+<script src="resources/srcset-helper.js"></script>
+<script src="../../resources/js-test.js"></script>
+<script>
+ var imgWidth;
+ addEventListener("load", function() {
+ // FIXME: clientWidth might be zero because of crbug.com/379155
+ imgWidth = document.getElementById("foo").clientWidth;
+ shouldBeTrue('imgWidth == 33554432 || imgWidth == 0');
+ }, false);
+</script>
+</head>
+
+<body id="body">
+ <div>
+ This test passes if the image is displayed with infinite dimensions.
+ Because of a <a href="http://crbug.com/379155">flaky bug</a> with infinite intrinsic dimensions,
+ It also accepts zero width.
+ </div>
+ <img id="foo" srcset="resources/blue-100-px-square.png 0x">
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/hidpi/image-srcset-intrinsic-size-zero-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698