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

Unified Diff: third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html

Issue 2340533003: Fix issue with non-touchpad scrolling event over resizer: should not cause an area resize. (Closed)
Patch Set: Initial Commit 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/input/ScrollManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html
diff --git a/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html b/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html
new file mode 100644
index 0000000000000000000000000000000000000000..b440a5d79a0422dfe797e884f4d1996ec838185d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/scroll-behavior/scroll-over-resizer.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
bokan 2016/09/16 15:45:35 No need for this meta
lunalu1 2016/09/16 16:13:38 Done.
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<body>
bokan 2016/09/16 15:45:35 No need for body tags either. See https://www.chro
lunalu1 2016/09/16 16:13:38 Done.
+ <textarea id="textarea" style="width: 150px; height: 100px;"></textarea>
+ <div id="resizablediv" style="resize:both; overflow:scroll; width: 100px; height: 100px;"></div>
+ <script>
+ function doScroll(x, y, deltaY, device) {
+ eventSender.gestureScrollBegin(device, x, y);
+ eventSender.gestureScrollUpdate(device, 0, deltaY);
+ eventSender.gestureScrollEnd(device, 0, 0);
+ }
+
+ function resize(id, deltaY, device) {
+ var target = document.getElementById(id);
+ var rect = target.getBoundingClientRect();
+ var old_height = target.offsetHeight;
+ // Scrolling within the normal resizer area (15 x 15)
+ doScroll(rect.right - 5, rect.bottom - 5, deltaY, device);
+
+ test(function() {
bokan 2016/09/16 15:45:35 I'd actually make test() wrap each |resize| call b
lunalu1 2016/09/16 16:13:38 Done.
+ assert_equals(target.offsetHeight - old_height, deltaY);
+ }, 'Target:' + id + ', from source: ' + device + ', should be vertically resized by ' + deltaY);
+ }
+
+ // When scrolling over the resizer by
+ // a mouse or a touch pad: expect no resize;
+ // a touchscree (i.e. tap and drag): expect resize.
+ resize("textarea", 20, "touchscreen");
+ resize("textarea", 0, "touchpad");
bokan 2016/09/16 15:45:35 Unless I'm missing something, if deltaY is 0, does
lunalu1 2016/09/16 16:13:38 Done.
+ resize("resizablediv", 20, "touchscreen");
+ resize("resizablediv", 0, "touchpad");
+ </script>
+</body>
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/ScrollManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698