| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <script src="../../resources/js-test.js"></script> | |
| 3 <script> | |
| 4 window.jsTestIsAsync = true; | |
| 5 | |
| 6 description("Test that wheel scrolling over the page scrollbar scrolls " + | |
| 7 "the page. We also placed an overflow div below the " + | |
| 8 "scrollbar to make sure we target the page and not the div " + | |
| 9 "in that case."); | |
| 10 | |
| 11 var overflowDiv; | |
| 12 | |
| 13 window.onload = function() { | |
| 14 if (!window.testRunner || !window.eventSender) | |
| 15 return; | |
| 16 | |
| 17 internals.settings.setScrollAnimatorEnabled(false); | |
| 18 | |
| 19 overflowDiv = document.getElementById('overflowDiv'); | |
| 20 | |
| 21 // Move the mouse over the vertical scrollbar. | |
| 22 eventSender.mouseMoveTo(790, 300); | |
| 23 | |
| 24 // Scroll down precisely by 30 px. | |
| 25 eventSender.continuousMouseScrollBy(0, -30, false, true); | |
| 26 | |
| 27 shouldBe('window.scrollY', '30'); | |
| 28 shouldBe('overflowDiv.scrollTop', '0'); | |
| 29 finishJSTest(); | |
| 30 } | |
| 31 </script> | |
| 32 | |
| 33 <body style="margin:0"> | |
| 34 <div id="overflowDiv" style="width:1000px; height:500px; overflow:scroll"> | |
| 35 <div style="height: 1000px"></div> | |
| 36 </div> | |
| 37 <div style="height: 1000px"></div> | |
| 38 </body> | |
| OLD | NEW |