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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/touch/gesture/gesture-scrollbar-mainframe.html

Issue 2925883003: [Touch Adjustment] Pass primary_pointer_type to WebGestureEvent and disable adjustment for stylus (Closed)
Patch Set: jochen and dtapuska's comments: Add default value Created 3 years, 5 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../../../../resources/testharness.js"></script> 2 <script src="../../../../resources/testharness.js"></script>
3 <script src="../../../../resources/testharnessreport.js"></script> 3 <script src="../../../../resources/testharnessreport.js"></script>
4 <style> 4 <style>
5 ::-webkit-scrollbar { 5 ::-webkit-scrollbar {
6 background-color: #ccc; 6 background-color: #ccc;
7 /* fixed size for consistent touch adjustment behavior across platforms */ 7 /* fixed size for consistent touch adjustment behavior across platforms */
8 width: 15px; 8 width: 15px;
9 } 9 }
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 var touchWidth = 25; 48 var touchWidth = 25;
49 var touchHeight = 25; 49 var touchHeight = 25;
50 50
51 // Scroll down to ensure we test the difference between content and client 51 // Scroll down to ensure we test the difference between content and client
52 // co-ordinate spaces. 52 // co-ordinate spaces.
53 window.scrollTo(0, 800); 53 window.scrollTo(0, 800);
54 assert_equals(window.scrollY, 800); 54 assert_equals(window.scrollY, 800);
55 55
56 eventSender.gestureTapDown(scrollbarX, scrollbarY, touchWidth, touchHeight); 56 eventSender.gestureTapDown(scrollbarX, scrollbarY, touchWidth, touchHeight);
57 eventSender.gestureShowPress(scrollbarX, scrollbarY, touchWidth, touchHeight); 57 eventSender.gestureShowPress(scrollbarX, scrollbarY, touchWidth, touchHeight);
58 eventSender.gestureScrollBegin(scrollbarX - 20, scrollbarY, touchWidth, touchH eight); 58 eventSender.gestureScrollBegin(scrollbarX - 20, scrollbarY);
59 eventSender.gestureTapCancel(scrollbarX, scrollbarY); 59 eventSender.gestureTapCancel(scrollbarX, scrollbarY);
60 assert_equals(window.scrollY, 800); 60 assert_equals(window.scrollY, 800);
61 eventSender.gestureScrollUpdate(0, 20); 61 eventSender.gestureScrollUpdate(0, 20);
62 // We don't know exactly how far draging the thumb will scroll. If we end 62 // We don't know exactly how far draging the thumb will scroll. If we end
63 // up scrolling in the wrong direction it probably means hit tests are passing 63 // up scrolling in the wrong direction it probably means hit tests are passing
64 // through the scrollbar and hitting the content. 64 // through the scrollbar and hitting the content.
65 assert_greater_than(window.scrollY, 820); 65 assert_greater_than(window.scrollY, 820);
66 eventSender.gestureScrollUpdate(0, 60); 66 eventSender.gestureScrollUpdate(0, 60);
67 assert_greater_than(window.scrollY, 885); 67 assert_greater_than(window.scrollY, 885);
68 eventSender.gestureScrollEnd(0, 0); 68 eventSender.gestureScrollEnd(0, 0);
69 assert_greater_than(window.scrollY, 885); 69 assert_greater_than(window.scrollY, 885);
70 }, 'This tests scroll gesture events on main frame scroll bars The document shou ld be slightly scrolled down if successful.'); 70 }, 'This tests scroll gesture events on main frame scroll bars The document shou ld be slightly scrolled down if successful.');
71 71
72 </script> 72 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698