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

Side by Side Diff: LayoutTests/fast/hidpi/image-srcset-dpr-zoom.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 unified diff | Download patch
OLDNEW
(Empty)
1 <html>
2 <head>
3 <script>
4 if (!window.eventSender)
5 document.write("Automatic zoom-in does not work in manual mode. Try zoom ing in manually and refresh.");
6 else
7 while(!matchMedia("screen and (min-resolution: 2dppx)").matches)
8 eventSender.zoomPageIn();
9 </script>
10 <script src="../js/resources/js-test-pre.js"></script>
11 <script>
12 if (window.testRunner) {
13 testRunner.dumpAsText();
14 }
15
16 function updateSrc() {
17 var img = document.getElementById("foo");
18 img.srcset = "resources/blue-100-px-square.png 1x, resources/green-200-p x-square.png 2x";
19 }
20
21 addEventListener("DOMContentLoaded", function() {
22 updateSrc();
23 }, false);
24
25 addEventListener("load", function() {
26 shouldBeTrue('document.getElementById("foo").clientWidth==200');
27 }, false);
28 </script>
29 </head>
30
31 <body id="body">
32 <div>This test passes if the image below is a 200px wide green square when t he deviceScaleFactor is 1, since the user has zoomed in.</div>
33 <img id="foo">
34 </body>
35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698