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