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

Unified Diff: content/browser/renderer_host/input/touch_disposition_gesture_filter_unittest.cc

Issue 181833003: [Android] Out with the Android GR, in with the new unified C++ GR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup and rebase Created 6 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 side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698