OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../js/resources/js-test-pre.js"></script> | 2 <script src="../../resources/js-test.js"></script> |
3 <script> | 3 <script> |
4 if (!window.eventSender) { | 4 if (!window.eventSender) { |
5 document.write("This test does not work in manual mode."); | 5 document.write("This test does not work in manual mode."); |
6 } else { | 6 } else { |
7 var initialResolution = window.devicePixelRatio; | 7 var initialResolution = window.devicePixelRatio; |
8 shouldBeTrue('matchMedia("(resolution: " + initialResolution + "dppx)").
matches'); | 8 shouldBeTrue('matchMedia("(resolution: " + initialResolution + "dppx)").
matches'); |
9 shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolu
tion + ")").matches'); | 9 shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolu
tion + ")").matches'); |
10 | 10 |
11 eventSender.zoomPageIn(); | 11 eventSender.zoomPageIn(); |
12 | 12 |
13 shouldBeTrue('matchMedia("(resolution: " + initialResolution * 1.2 + "dp
px)").matches'); | 13 shouldBeTrue('matchMedia("(resolution: " + initialResolution * 1.2 + "dp
px)").matches'); |
14 shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolu
tion * 1.2 + ")").matches'); | 14 shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolu
tion * 1.2 + ")").matches'); |
15 | 15 |
16 eventSender.zoomPageOut(); | 16 eventSender.zoomPageOut(); |
17 eventSender.zoomPageOut(); | 17 eventSender.zoomPageOut(); |
18 | 18 |
19 shouldBeTrue('matchMedia("(resolution: " + initialResolution / 1.2 + "dp
px)").matches'); | 19 shouldBeTrue('matchMedia("(resolution: " + initialResolution / 1.2 + "dp
px)").matches'); |
20 shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolu
tion / 1.2 + ")").matches'); | 20 shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolu
tion / 1.2 + ")").matches'); |
21 } | 21 } |
22 </script> | 22 </script> |
OLD | NEW |