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

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

Issue 2669663002: Move touch slop suppression to TouchEventManager (Closed)
Patch Set: slop regesion Created 3 years, 10 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 <script src="../../../resources/js-test.js"></script> 1 <script src="../../../resources/js-test.js"></script>
2 <div id="target">Target</div> 2 <div id="target">Target</div>
3 <div id="description">Test user gesture behavior during touch events.</div> 3 <div id="description">Test user gesture behavior during touch events.</div>
4 <div id="console"></div> 4 <div id="console"></div>
5 5
6 <script> 6 <script>
7 7
8 var cancelEvent = false; 8 var cancelEvent = false;
9 var openedPopup = undefined; 9 var openedPopup = undefined;
10 function handler(e) { 10 function handler(e) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 var rect = target.getBoundingClientRect(); 51 var rect = target.getBoundingClientRect();
52 var targetX = rect.left + rect.width / 2; 52 var targetX = rect.left + rect.width / 2;
53 var targetY = rect.top + rect.height / 2; 53 var targetY = rect.top + rect.height / 2;
54 54
55 debug("During a scroll, no touch events are user gestures"); 55 debug("During a scroll, no touch events are user gestures");
56 cancelEvent = false; 56 cancelEvent = false;
57 eventSender.addTouchPoint(targetX, targetY); 57 eventSender.addTouchPoint(targetX, targetY);
58 testPopupOnEventDuring('touchstart', false, function() { eventSender.touchStart( ); }); 58 testPopupOnEventDuring('touchstart', false, function() { eventSender.touchStart( ); });
59 eventSender.updateTouchPoint(0, targetX + 10, targetY); 59 eventSender.updateTouchPoint(0, targetX + 10, targetY);
60 testPopupOnEventDuring('touchmove', false, function() { eventSender.touchMove("m ovedBeyondSlopRegion"); }); 60 testPopupOnEventDuring('touchmove', false, function() { eventSender.touchMove(); });
61 eventSender.notifyStartOfTouchScroll(); 61 eventSender.notifyStartOfTouchScroll();
62 eventSender.releaseTouchPoint(0); 62 eventSender.releaseTouchPoint(0);
63 testPopupOnEventDuring('touchend', false, function() { eventSender.touchEnd(); } ); 63 testPopupOnEventDuring('touchend', false, function() { eventSender.touchEnd(); } );
64 64
65 debug("During a drag that isn't a scroll, only touchend is a user gesture"); 65 debug("During a drag that isn't a scroll, only touchend is a user gesture");
66 cancelEvent = true; 66 cancelEvent = true;
67 eventSender.addTouchPoint(targetX, targetY); 67 eventSender.addTouchPoint(targetX, targetY);
68 testPopupOnEventDuring('touchstart', false, function() { eventSender.touchStart( ); }); 68 testPopupOnEventDuring('touchstart', false, function() { eventSender.touchStart( ); });
69 eventSender.updateTouchPoint(0, targetX + 10, targetY); 69 eventSender.updateTouchPoint(0, targetX + 10, targetY);
70 testPopupOnEventDuring('touchmove', false, function() { eventSender.touchMove(); }); 70 testPopupOnEventDuring('touchmove', false, function() { eventSender.touchMove(); });
71 eventSender.releaseTouchPoint(0); 71 eventSender.releaseTouchPoint(0);
72 testPopupOnEventDuring('touchend', true, function() { eventSender.touchEnd(); }) ; 72 testPopupOnEventDuring('touchend', true, function() { eventSender.touchEnd(); }) ;
73 73
74 </script> 74 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698