Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / media / mq-with-screen-size-in-physical-pixels-quirk.html
bloba08417c3ce2e542d44f40f0fbf707b8388a72cd7
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("This test verifies behavior of the ReportScreenSizeInPhysicalPixelsQuirk setting.");
10 if (window.internals)
11 window.internals.setDeviceScaleFactor(2);
12 else
13 debug("WARN: This test depends on availability of window.internals.");
15 // Hide the actual screen dimensions from the test output.
16 deviceWidthIsSameAsScreenWidth = matchMedia("screen and (device-width:" + screen.width + "px)").matches;
17 deviceHeightIsSameAsScreenHeight = matchMedia("screen and (device-height:" + screen.height + "px)").matches;
18 shouldBeTrue("deviceWidthIsSameAsScreenWidth");
19 shouldBeTrue("deviceHeightIsSameAsScreenHeight");
21 if (window.internals)
22 window.internals.settings.setReportScreenSizeInPhysicalPixelsQuirk(true);
23 else
24 debug("WARN: This test depends on the ReportScreenSizeInPhysicalPixelsQuirk setting to be true.");
26 // screen.width and .height will be scaled by the scale factor (tested independently).
27 deviceWidthIsSameAsScreenWidth = matchMedia("screen and (device-width:" + screen.width + "px)").matches;
28 deviceHeightIsSameAsScreenHeight = matchMedia("screen and (device-height:" + screen.height + "px)").matches;
29 shouldBeTrue("deviceWidthIsSameAsScreenWidth");
30 shouldBeTrue("deviceHeightIsSameAsScreenHeight");
31 </script>
32 </body>
33 </html>