chromium/third_party/blink/web_tests/fast/media/mq-with-screen-size-in-physical-pixels-quirk.html

<!DOCTYPE html>
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<script>
    description("This test verifies behavior of the ReportScreenSizeInPhysicalPixelsQuirk setting.");

    if (window.testRunner)
        testRunner.setBackingScaleFactor(2, function() {});
    else
        debug("WARN: This test depends on availability of window.testRunner.");

    // Hide the actual screen dimensions from the test output.
    deviceWidthIsSameAsScreenWidth = matchMedia("screen and (device-width:" + screen.width + "px)").matches;
    deviceHeightIsSameAsScreenHeight = matchMedia("screen and (device-height:" + screen.height + "px)").matches;
    shouldBeTrue("deviceWidthIsSameAsScreenWidth");
    shouldBeTrue("deviceHeightIsSameAsScreenHeight");

    if (window.internals)
        internals.settings.setReportScreenSizeInPhysicalPixelsQuirk(true);
    else
        debug("WARN: This test depends on the ReportScreenSizeInPhysicalPixelsQuirk setting to be true.");

    // screen.width and .height will be scaled by the scale factor (tested independently).
    deviceWidthIsSameAsScreenWidth = matchMedia("screen and (device-width:" + screen.width + "px)").matches;
    deviceHeightIsSameAsScreenHeight = matchMedia("screen and (device-height:" + screen.height + "px)").matches;
    shouldBeTrue("deviceWidthIsSameAsScreenWidth");
    shouldBeTrue("deviceHeightIsSameAsScreenHeight");
</script>
</body>
</html>