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

Unified Diff: ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc

Issue 212663010: Store the id of a contributing motion event in GestureEventData (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update test. Created 6 years, 9 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 | « ui/events/gesture_detection/touch_disposition_gesture_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
diff --git a/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc b/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
index 79f1096d5ea9e6376882f9eee567819afb0d3df0..f9f756b30186ba950e1185e2389df67a67316c25 100644
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc
@@ -168,7 +168,7 @@ class TouchDispositionGestureFilterTest
}
static GestureEventData CreateGesture(EventType type) {
- return GestureEventData(type, base::TimeTicks(), 0, 0);
+ return GestureEventData(type, 0, base::TimeTicks(), 0, 0);
}
private:
@@ -522,11 +522,14 @@ TEST_F(TouchDispositionGestureFilterTest, MultipleTouchSequences) {
TEST_F(TouchDispositionGestureFilterTest, FlingCancelledOnNewTouchSequence) {
// Simulate a fling.
+ PushGesture(ET_GESTURE_TAP_DOWN);
PushGesture(ET_GESTURE_SCROLL_BEGIN);
PressTouchPoint(1, 1);
SendTouchNotConsumedAck();
- EXPECT_TRUE(GesturesMatch(Gestures(ET_GESTURE_SCROLL_BEGIN),
- GetAndResetSentGestures()));
+ EXPECT_TRUE(GesturesMatch(
+ Gestures(
+ ET_GESTURE_TAP_DOWN, ET_GESTURE_TAP_CANCEL, ET_GESTURE_SCROLL_BEGIN),
+ GetAndResetSentGestures()));
PushGesture(ET_SCROLL_FLING_START);
ReleaseTouchPoint();
SendTouchNotConsumedAck();
@@ -545,11 +548,14 @@ TEST_F(TouchDispositionGestureFilterTest, FlingCancelledOnNewTouchSequence) {
TEST_F(TouchDispositionGestureFilterTest, ScrollEndedOnNewTouchSequence) {
// Simulate a scroll.
+ PushGesture(ET_GESTURE_TAP_DOWN);
PushGesture(ET_GESTURE_SCROLL_BEGIN);
PressTouchPoint(1, 1);
SendTouchNotConsumedAck();
- EXPECT_TRUE(GesturesMatch(Gestures(ET_GESTURE_SCROLL_BEGIN),
- GetAndResetSentGestures()));
+ EXPECT_TRUE(GesturesMatch(
+ Gestures(
+ ET_GESTURE_TAP_DOWN, ET_GESTURE_TAP_CANCEL, ET_GESTURE_SCROLL_BEGIN),
+ GetAndResetSentGestures()));
ReleaseTouchPoint();
SendTouchNotConsumedAck();
@@ -562,11 +568,14 @@ TEST_F(TouchDispositionGestureFilterTest, ScrollEndedOnNewTouchSequence) {
TEST_F(TouchDispositionGestureFilterTest, FlingCancelledOnScrollBegin) {
// Simulate a fling sequence.
+ PushGesture(ET_GESTURE_TAP_DOWN);
PushGesture(ET_GESTURE_SCROLL_BEGIN);
PushGesture(ET_SCROLL_FLING_START);
PressTouchPoint(1, 1);
SendTouchNotConsumedAck();
- EXPECT_TRUE(GesturesMatch(Gestures(ET_GESTURE_SCROLL_BEGIN,
+ EXPECT_TRUE(GesturesMatch(Gestures(ET_GESTURE_TAP_DOWN,
+ ET_GESTURE_TAP_CANCEL,
+ ET_GESTURE_SCROLL_BEGIN,
ET_SCROLL_FLING_START),
GetAndResetSentGestures()));
« no previous file with comments | « ui/events/gesture_detection/touch_disposition_gesture_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698