Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/selection-autoscroll-borderbelt.html

Issue 2355643002: Selection-autoscroll should be triggered when the pointer is in the border belt. (Closed)
Patch Set: Use requestAnimationFrame instead. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/AutoscrollController.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/AutoscrollController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698