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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/input/ScrollManager.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 <meta charset="utf-8">
bokan 2016/09/16 15:45:35 No need for this meta
lunalu1 2016/09/16 16:13:38 Done.
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <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.
6 <textarea id="textarea" style="width: 150px; height: 100px;"></textarea>
7 <div id="resizablediv" style="resize:both; overflow:scroll; width: 100px; heig ht: 100px;"></div>
8 <script>
9 function doScroll(x, y, deltaY, device) {
10 eventSender.gestureScrollBegin(device, x, y);
11 eventSender.gestureScrollUpdate(device, 0, deltaY);
12 eventSender.gestureScrollEnd(device, 0, 0);
13 }
14
15 function resize(id, deltaY, device) {
16 var target = document.getElementById(id);
17 var rect = target.getBoundingClientRect();
18 var old_height = target.offsetHeight;
19 // Scrolling within the normal resizer area (15 x 15)
20 doScroll(rect.right - 5, rect.bottom - 5, deltaY, device);
21
22 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.
23 assert_equals(target.offsetHeight - old_height, deltaY);
24 }, 'Target:' + id + ', from source: ' + device + ', should be vertically r esized by ' + deltaY);
25 }
26
27 // When scrolling over the resizer by
28 // a mouse or a touch pad: expect no resize;
29 // a touchscree (i.e. tap and drag): expect resize.
30 resize("textarea", 20, "touchscreen");
31 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.
32 resize("resizablediv", 20, "touchscreen");
33 resize("resizablediv", 0, "touchpad");
34 </script>
35 </body>
OLDNEW
« 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