Index: content/browser/renderer_host/input/touch_disposition_gesture_filter_unittest.cc |
diff --git a/content/browser/renderer_host/input/touch_disposition_gesture_filter_unittest.cc b/content/browser/renderer_host/input/touch_disposition_gesture_filter_unittest.cc |
index 16b4b7e4d94d456417d74e37e91cd98542e26e1a..84f570c7e15fca37513a45286777991909e52a7c 100644 |
--- a/content/browser/renderer_host/input/touch_disposition_gesture_filter_unittest.cc |
+++ b/content/browser/renderer_host/input/touch_disposition_gesture_filter_unittest.cc |
@@ -543,6 +543,23 @@ TEST_F(TouchDispositionGestureFilterTest, FlingCancelledOnNewTouchSequence) { |
EXPECT_FALSE(GesturesSent()); |
} |
+TEST_F(TouchDispositionGestureFilterTest, ScrolleEndedOnNewTouchSequence) { |
tdresser
2014/02/27 15:28:30
ScrolleEnded -> ScrollEnded
jdduke (slow)
2014/02/27 17:40:29
Done.
|
+ // Simulate a scroll. |
+ PushGesture(WebInputEvent::GestureScrollBegin); |
+ PressTouchPoint(1, 1); |
+ SendTouchEventACK(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS); |
+ EXPECT_TRUE(GesturesMatch(Gestures(WebInputEvent::GestureScrollBegin), |
+ GetAndResetSentGestures())); |
+ ReleaseTouchPoint(0); |
+ SendTouchEventACK(INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS); |
+ |
+ // A new touch seqeuence should end the outstanding scroll. |
+ PressTouchPoint(1, 1); |
+ SendTouchEventACK(INPUT_EVENT_ACK_STATE_CONSUMED); |
+ EXPECT_TRUE(GesturesMatch(Gestures(WebInputEvent::GestureScrollEnd), |
+ GetAndResetSentGestures())); |
+} |
+ |
TEST_F(TouchDispositionGestureFilterTest, FlingCancelledOnScrollBegin) { |
// Simulate a fling sequence. |
PushGesture(WebInputEvent::GestureScrollBegin); |