OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 @media (min-resolution: 2dppx) { |
| 6 body { background-color: green; } |
| 7 } |
| 8 </style> |
| 9 <p>The viewport should have a green background for page zoom = 200%.</p> |
| 10 <script> |
| 11 setup({ "explicit_done": true }); |
| 12 |
| 13 matchMedia("(min-resolution: 2dppx)").addListener((mq) => { |
| 14 test(() => { |
| 15 assert_true(mq.matches, "resolution query doesn't match after page z
oom."); |
| 16 }, "Check that the MediaQueryList matches the resolution query."); |
| 17 |
| 18 test(() => { |
| 19 assert_equals(getComputedStyle(document.body).backgroundColor, "rgb(
0, 128, 0)", "Background color of body is not green."); |
| 20 }, "Check that the background color is applied after the media query res
ult changed."); |
| 21 done(); |
| 22 }); |
| 23 |
| 24 onload = () => { |
| 25 document.body.offsetTop; |
| 26 if (window.eventSender) |
| 27 eventSender.setPageZoomFactor(2.0); |
| 28 }; |
| 29 </script> |
OLD | NEW |