| <!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> |