WebCore:
[WebKit-https.git] / LayoutTests / fast / events / mousemove-after-drag-over-scrollbar.html
1 <html>
2     <head>
3         <script>
4             function test()
5             {
6                 if (window.layoutTestController) {
7                     layoutTestController.dumpAsText();
8                     var d1 = document.getElementById('d1');
9                     var d2 = document.getElementById('d2');
10                     eventSender.dragMode = false;
11                     var left = d1.offsetLeft + 10;
12                     var top = d1.offsetTop + 10;
13                     
14                     eventSender.mouseMoveTo(left, top);
15                     eventSender.mouseDown();
16                     left = d2.offsetLeft - 10;
17                     eventSender.mouseMoveTo(left, top);
18                     left += 20;
19                     eventSender.mouseMoveTo(left, top);
20                     eventSender.mouseUp();
21                 }
22             }
23                         
24             function log(msg)
25             {
26                 document.getElementById('console').appendChild(document.createTextNode(msg + '\n'));
27             }
28         </script>
29     </head>
30     <body onload="test()">
31     This tests that we continue to get mouse events after dragging past a scrollbar.<br>
32     <div id="d1" style="height:120px; width:120px; overflow: auto; display: inline-block; background-color: red;" onmousemove="log('mousemove - box 1')">Start a drag in this square, and drag past the scrollbar to the green square.  Start a drag in this square, and drag past the scrollbar to the green square.  </div>
33     <div id="d2" style="height:120px; width:120px; display: inline-block; background-color: green;" onmousemove="log('mousemove - box 2')"></div><br><br>
34     <pre id="console"></pre>
35     </body>
36 </html>