OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/js-test.js"></script> | |
3 <script> | |
4 description("Test that wheel scrolling over the page scrollbar scrolls " + | |
5 "the page. We also placed an overflow div below the " + | |
6 "scrollbar to make sure we target the page and not the div " + | |
7 "in that case."); | |
8 | |
9 var overflowDiv; | |
10 | |
11 window.onload = function() { | |
12 if (!window.testRunner || !window.eventSender) | |
13 return; | |
14 | |
15 internals.settings.setScrollAnimatorEnabled(false); | |
16 | |
17 overflowDiv = document.getElementById('overflowDiv'); | |
18 | |
19 // Move the mouse over the vertical scrollbar. | |
20 eventSender.mouseMoveTo(790, 300); | |
21 | |
22 // Scroll down precisely by 30 px. | |
23 eventSender.continuousMouseScrollBy(0, -30, false, true); | |
24 | |
25 shouldBe('window.scrollY', '30'); | |
dtapuska
2016/03/15 18:57:18
This test assumes that scrolling occurs on mouse s
| |
26 shouldBe('overflowDiv.scrollTop', '0'); | |
27 finishJSTest(); | |
jbroman
2016/03/16 15:41:00
"finishJSTest()" without "jsTestIsAsync = true;" i
bokan
2016/03/16 18:01:45
Nope, it was cargo-culted. I've removed it since i
jbroman
2016/03/16 18:05:52
Actually, I think you do want jsTestIsAsync and fi
bokan
2016/03/16 19:18:15
Yah, I think you're right. I thought the layout te
| |
28 } | |
29 </script> | |
30 | |
31 <body style="margin:0"> | |
32 <div id="overflowDiv" style="width:1000px; height:500px; overflow:scroll"> | |
33 <div style="height: 1000px"></div> | |
34 </div> | |
35 <div style="height: 1000px"></div> | |
36 </body> | |
OLD | NEW |