9 if (window
.testRunner
) {
10 testRunner
.dumpAsText();
11 var d1
= document
.getElementById('d1');
12 var d2
= document
.getElementById('d2');
13 eventSender
.dragMode
= false;
14 var left
= d1
.offsetLeft
+ 10;
15 var top
= d1
.offsetTop
+ 10;
16 eventSender
.mouseMoveTo(left
, top
);
17 eventSender
.mouseDown();
18 left
= d2
.offsetLeft
- 10;
19 eventSender
.mouseMoveTo(left
, top
);
21 eventSender
.mouseMoveTo(left
, top
);
22 eventSender
.mouseMoveTo(left
++, top
);
23 eventSender
.mouseMoveTo(left
++, top
);
24 eventSender
.mouseMoveTo(left
++, top
);
25 eventSender
.mouseMoveTo(left
++, top
);
26 eventSender
.mouseMoveTo(left
++, top
);
27 eventSender
.mouseMoveTo(left
++, top
);
28 eventSender
.mouseUp();
30 // We do not count mouse moves since Mac records a move for the mouseUp event and Windows does not
31 // See <rdar://problem/5674087> mouseUp events send onmousemove events on Mac but not on Windows.
32 if ((box1Sum
== 2) && (box2Sum
> 2))
33 document
.getElementById('console').appendChild(document
.createTextNode('Test Succeeded!\n'));
35 document
.getElementById('console').appendChild(document
.createTextNode('Test Failed!\n'));
48 <body onload=
"test()">
49 This tests that we continue to get mouse events after dragging past a scrollbar.
<br>
50 <div id=
"d1" style=
"height:120px; width:120px; overflow: auto; display: inline-block; background-color: red;" onmousemove=
"record(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>
51 <div id=
"d2" style=
"height:120px; width:120px; display: inline-block; background-color: green;" onmousemove=
"record(2)"></div><br><br>
52 <pre id=
"console"></pre>