blob: a6009361f5f06332cbab954a271f8632bfdbf3bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<!DOCTYPE html>
<script src="../../resources/js-test.js"></script>
<script>
if (!window.eventSender) {
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');
eventSender.zoomPageIn();
shouldBeTrue('matchMedia("(resolution: " + initialResolution * 1.2 + "dppx)").matches');
shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution * 1.2 + ")").matches');
eventSender.zoomPageOut();
eventSender.zoomPageOut();
shouldBeTrue('matchMedia("(resolution: " + initialResolution / 1.2 + "dppx)").matches');
shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution / 1.2 + ")").matches');
}
</script>
|