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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-in-fix.html

Issue 2441683002: Prevent AutoscrollForSelection when selecting text in a fixed-position element. (Closed)
Patch Set: Edited the test. Created 4 years, 2 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
Index: third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-in-fix.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-in-fix.html b/third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-in-fix.html
new file mode 100644
index 0000000000000000000000000000000000000000..7c454c0abb36f190d8bf96649a7a23b679a68953
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-in-fix.html
@@ -0,0 +1,35 @@
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<div style="height: 400px; position: fixed; width: 400px; top: 500px;">
+<br />Fixed.......................
+<br />Fixed.......................
+<br />Fixed.......................
+<br />Fixed.......................
+<br />Fixed.......................
+<br />Fixed.......................
+<br />Fixed.......................
+</div>
+<div style="height: 2000px"></div>
+<script>
+var testFix = async_test('Selection-autoscroll should not be triggered when the selection is in a fixed-position element');
+testFix.step(function() {
+ if (!window.eventSender)
+ return;
+ var dragStartX = 50;
+ var dragStartY = 550;
+ var dragEndX = 60;
+ var dragMoveY = 580;
+ var dragEndY = 820;
+
+ eventSender.dragMode = false;
+ eventSender.mouseMoveTo(dragStartX, dragStartY);
+ eventSender.mouseDown();
+ eventSender.mouseMoveTo(dragEndX, dragMoveY);
+ eventSender.mouseMoveTo(dragEndX, dragEndY);
+
+ requestAnimationFrame(function() {
+ assert_equals(document.body.scrollTop, 0);
+ testFix.done();
+ });
+});
+</script>

Powered by Google App Engine
This is Rietveld 408576698