OLD | NEW |
1 <head> | 1 <head> |
2 <style> | 2 <style> |
3 html, body { margin:0; overflow: hidden; } | 3 html, body { margin:0; overflow: hidden; } |
4 </style> | 4 </style> |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../js/resources/js-test-pre.js"></script> |
6 </head> | 6 </head> |
7 | 7 |
8 <div>This tests that a usually overflow: hidden viewport should be scrollable wh
en scaled. Otherwise, you can't get to content | 8 <div>This tests that a usually overflow: hidden viewport should be scrollable wh
en scaled. Otherwise, you can't get to content |
9 you would have been able to get to had you not been zoomed it.</div> | 9 you would have been able to get to had you not been zoomed it.</div> |
10 <div id="console"></div> | 10 <div id="console"></div> |
11 | 11 |
12 <div style='font-size:40px; height: 1000px;'> | 12 <div style='font-size:40px; height: 1000px;'> |
13 </div> | 13 </div> |
14 | 14 |
15 <script> | 15 <script> |
16 (function() { | 16 (function() { |
17 if (!window.testRunner) { | 17 if (!window.testRunner) { |
18 debug("This test only works in the test runner."); | 18 debug("This test only works in the test runner."); |
19 return; | 19 return; |
20 } | 20 } |
21 | 21 |
22 // Force a layout. | 22 // Force a layout. |
23 document.body.offsetLeft; | 23 document.body.offsetLeft; |
24 | 24 |
25 if (window.internals) | 25 if (window.eventSender) |
26 window.internals.setPageScaleFactor(2, 0, 0); | 26 window.eventSender.setPageScaleFactor(2, 0, 0); |
27 | 27 |
28 shouldBe("window.document.body.scrollTop", "0"); | 28 shouldBe("window.document.body.scrollTop", "0"); |
29 | 29 |
30 if (window.eventSender) { | 30 if (window.eventSender) { |
31 eventSender.mouseMoveTo(100, 100); | 31 eventSender.mouseMoveTo(100, 100); |
32 eventSender.mouseScrollBy(0, -5); | 32 eventSender.mouseScrollBy(0, -5); |
33 } | 33 } |
34 | 34 |
35 shouldBe("window.document.body.scrollTop", "100"); | 35 shouldBe("window.document.body.scrollTop", "100"); |
36 })(); | 36 })(); |
37 </script> | 37 </script> |
OLD | NEW |