4 <script src=
"../../resources/js-test.js"></script>
8 description("This test verifies behavior of the ReportScreenSizeInPhysicalPixelsQuirk setting.");
11 window
.internals
.setDeviceScaleFactor(2);
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");
22 window
.internals
.settings
.setReportScreenSizeInPhysicalPixelsQuirk(true);
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");