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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/page/AutoscrollController.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/events/selection-autoscroll-borderbelt.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/selection-autoscroll-borderbelt.html b/third_party/WebKit/LayoutTests/fast/events/selection-autoscroll-borderbelt.html
new file mode 100644
index 0000000000000000000000000000000000000000..3e933583f9522d6e66f4f5503b577c7e7073e944
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/selection-autoscroll-borderbelt.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+For manual testing, Select some text and drag the mouse close to the bottom
+(do not reach the border) before releasing.
+ <div id="scrollable" style="height: 100px; overflow: auto; border: solid 3px #cc0000">
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ <p>This is a very long sentence to take up some space.</p>
+ </div>
+</body>
+<script>
+var scrollable = document.getElementById("scrollable");
+var retryCount = 0;
+var testAutoscroll = async_test('Selection-autoscroll should be triggered when the mouse is within the border belt');
+testAutoscroll.step(function() {
+ if (!window.eventSender)
+ return;
+
+ var dragStartX = scrollable.offsetLeft + 20;
+ var dragStartY = scrollable.offsetTop + 5;
+ var dragEndX = dragStartX;
+ var dragEndY = scrollable.offsetTop + scrollable.offsetHeight - 10;
+
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(dragStartX, dragStartY);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(dragEndX, dragEndY);
+
+ requestAnimationFrame(function() {
+ assert_not_equals(scrollable.scrollTop, 0);
+ testAutoscroll.done();
+ });
+});
+</script>
« 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