OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 For manual testing, Select some text and drag the mouse close to the bottom |
| 5 (do not reach the border) before releasing. |
| 6 <div id="scrollable" style="height: 100px; overflow: auto; border: solid 3px
#cc0000"> |
| 7 <p>This is a very long sentence to take up some space.</p> |
| 8 <p>This is a very long sentence to take up some space.</p> |
| 9 <p>This is a very long sentence to take up some space.</p> |
| 10 <p>This is a very long sentence to take up some space.</p> |
| 11 <p>This is a very long sentence to take up some space.</p> |
| 12 <p>This is a very long sentence to take up some space.</p> |
| 13 <p>This is a very long sentence to take up some space.</p> |
| 14 <p>This is a very long sentence to take up some space.</p> |
| 15 <p>This is a very long sentence to take up some space.</p> |
| 16 <p>This is a very long sentence to take up some space.</p> |
| 17 </div> |
| 18 </body> |
| 19 <script> |
| 20 var scrollable = document.getElementById("scrollable"); |
| 21 var retryCount = 0; |
| 22 var testAutoscroll = async_test('Selection-autoscroll should be triggered when t
he mouse is within the border belt'); |
| 23 testAutoscroll.step(function() { |
| 24 if (!window.eventSender) |
| 25 return; |
| 26 |
| 27 var dragStartX = scrollable.offsetLeft + 20; |
| 28 var dragStartY = scrollable.offsetTop + 5; |
| 29 var dragEndX = dragStartX; |
| 30 var dragEndY = scrollable.offsetTop + scrollable.offsetHeight - 10; |
| 31 |
| 32 eventSender.dragMode = false; |
| 33 eventSender.mouseMoveTo(dragStartX, dragStartY); |
| 34 eventSender.mouseDown(); |
| 35 eventSender.mouseMoveTo(dragEndX, dragEndY); |
| 36 |
| 37 requestAnimationFrame(function() { |
| 38 assert_not_equals(scrollable.scrollTop, 0); |
| 39 testAutoscroll.done(); |
| 40 }); |
| 41 }); |
| 42 </script> |
OLD | NEW |