OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/js-test.js"></script> | |
Yoav Weiss
2016/06/03 10:15:49
Could you rewrite the test using testharness? It's
rune
2016/06/03 11:09:08
Done.
| |
3 <style> | |
4 @media (min-resolution: 2dppx) { | |
5 body { background-color: green; } | |
6 } | |
7 </style> | |
8 <p>The viewport should have a green background for page zoom = 200%.</p> | |
9 <script> | |
10 description("Check that page zoom causes resolution media query changes to t ake effect."); | |
11 | |
12 jsTestIsAsync = true; | |
13 | |
14 matchMedia("(min-resolution: 2dppx)").addListener((mq) => { | |
15 shouldBeTrue(mq.matches); | |
16 shouldBeEqualToString("getComputedStyle(document.body).backgroundColor", "rgb(0, 128, 0)"); | |
17 finishJSTest(); | |
18 }); | |
19 | |
20 onload = () => { | |
21 document.body.offsetTop; | |
22 if (window.eventSender) | |
23 eventSender.setPageZoomFactor(2.0); | |
24 }; | |
25 </script> | |
OLD | NEW |