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

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: Codereview update 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 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <textarea id="textarea" style="width: 150px; height: 100px;"></textarea>
5 <div id="resizablediv" style="resize:both; overflow:scroll; width: 100px; height : 100px;"></div>
6 <script>
7 function doScroll(x, y, deltaY, device) {
8 eventSender.gestureScrollBegin(device, x, y);
9 eventSender.gestureScrollUpdate(device, 0, deltaY);
10 eventSender.gestureScrollEnd(device, 0, 0);
11 }
12
13 function resize(id, scrollDeltaY, expectedDeltaY, device) {
14 var target = document.getElementById(id);
15 var rect = target.getBoundingClientRect();
16 var old_height = target.offsetHeight;
17 // Scrolling within the normal resizer area (15 x 15)
18 doScroll(rect.right - 5, rect.bottom - 5, scrollDeltaY, device);
19 assert_equals(target.offsetHeight - old_height, expectedDeltaY);
20 }
21
22 test(function() {
23 resize("textarea", 20, 20, "touchscreen");
24 }, 'Touchscreen drag resizes textarea');
25
26 test(function() {
27 resize("textarea", 20, 0, "touchpad");
28 }, 'Touchpad scroll should not resize textarea');
29
30 test(function() {
31 resize("resizablediv", 20, 20, "touchscreen");
32 }, 'Touchscreen drag resizes resizable div');
33
34 test(function() {
35 resize("resizablediv", 20, 0, "touchpad");
36 }, 'Touchpad scroll should not resize resizable div');
37 </script>
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