blob: 69f9dcf4ce4abe458d055bcb2c6c5a454b149084 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>
if (!window.testRunner) {
document.write("This test does not work in manual mode.");
} else {
var initialResolution = window.devicePixelRatio;
shouldBeTrue('matchMedia("(resolution: " + initialResolution + "dppx)").matches');
shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution + ")").matches');
testRunner.zoomPageIn();
shouldBeTrue('matchMedia("(resolution: " + initialResolution * 1.2 + "dppx)").matches');
shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution * 1.2 + ")").matches');
testRunner.zoomPageOut();
testRunner.zoomPageOut();
shouldBeTrue('matchMedia("(resolution: " + initialResolution / 1.2 + "dppx)").matches');
shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution / 1.2 + ")").matches');
}
</script>