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

Unified Diff: LayoutTests/fast/hidpi/image-srcset-fraction.html

Issue 23861003: Enable srcset support in HTMLImageElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a flaky test Created 7 years, 3 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/hidpi/image-srcset-fraction.html
diff --git a/LayoutTests/fast/hidpi/image-srcset-fraction.html b/LayoutTests/fast/hidpi/image-srcset-fraction.html
new file mode 100644
index 0000000000000000000000000000000000000000..e979bef923a4e5f812340cfce1735694c4aab1dc
--- /dev/null
+++ b/LayoutTests/fast/hidpi/image-srcset-fraction.html
@@ -0,0 +1,24 @@
+<html>
+<head>
+<script>
+ window.targetScaleFactor = 2.5;
+</script>
+<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() {
+ if (internals)
+ shouldBeTrue('document.getElementById("testimg").clientWidth==200');
+ }, false);
+</script>
+</head>
+<body>
+<div>This test passes if the srcset resource is loaded and displayed as the image</div>
+<img src="resources/blue-100-px-square.png" srcset="resources/green-200-px-square.png 2x" id="testimg">
+</body>
+</html>
+
« no previous file with comments | « LayoutTests/fast/hidpi/image-srcset-dpr-zoom-expected.txt ('k') | LayoutTests/fast/hidpi/image-srcset-fraction-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698