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

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

Issue 44983003: Events ignoring ack disposition receive synthetic acks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 2 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/gesture_event_filter_unittest.cc
diff --git a/content/browser/renderer_host/input/gesture_event_filter_unittest.cc b/content/browser/renderer_host/input/gesture_event_filter_unittest.cc
index 509c44de9925b3fc11af7f930d037e34dec5d47a..e8e4b8340d4ff5d9081314535c7f58713ee45c00 100644
--- a/content/browser/renderer_host/input/gesture_event_filter_unittest.cc
+++ b/content/browser/renderer_host/input/gesture_event_filter_unittest.cc
@@ -664,68 +664,6 @@ INSTANTIATE_TEST_CASE_P(AllSources,
WebGestureEvent::Touchpad));
#endif // GTEST_HAS_PARAM_TEST
-// Test that GestureShowPress and GestureTapDown events don't wait for ACKs.
-TEST_F(GestureEventFilterTest, GestureShowPressAndTapDownIgnoreAck) {
- SimulateGestureEvent(WebInputEvent::GestureShowPress,
- WebGestureEvent::Touchscreen);
-
- EXPECT_EQ(1U, GetAndResetSentGestureEventCount());
- EXPECT_EQ(0U, GestureEventLastQueueEventSize());
-
- SimulateGestureEvent(WebInputEvent::GestureShowPress,
- WebGestureEvent::Touchscreen);
-
- EXPECT_EQ(1U, GetAndResetSentGestureEventCount());
- EXPECT_EQ(0U, GestureEventLastQueueEventSize());
-
- SimulateGestureEvent(WebInputEvent::GestureShowPress,
- WebGestureEvent::Touchscreen);
-
- EXPECT_EQ(1U, GetAndResetSentGestureEventCount());
- EXPECT_EQ(0U, GestureEventLastQueueEventSize());
-
- SimulateGestureEvent(WebInputEvent::GestureTapDown,
- WebGestureEvent::Touchscreen);
-
- EXPECT_EQ(1U, GetAndResetSentGestureEventCount());
- // The show press and tap down events will have escaped the queue, since they
- // ignore acks.
- EXPECT_EQ(0U, GestureEventLastQueueEventSize());
-}
-
-// Test that GestureShowPress events don't get out of order due to
-// ignoring their acks.
-TEST_F(GestureEventFilterTest, GestureShowPressIsInOrder) {
- SimulateGestureEvent(WebInputEvent::GestureTap,
- WebGestureEvent::Touchscreen);
-
- EXPECT_EQ(1U, GetAndResetSentGestureEventCount());
- EXPECT_EQ(1U, GestureEventLastQueueEventSize());
-
- SimulateGestureEvent(WebInputEvent::GestureShowPress,
- WebGestureEvent::Touchscreen);
-
- EXPECT_EQ(0U, GetAndResetSentGestureEventCount());
- // The ShowPress, though it ignores ack, is still stuck in the queue
- // behind the Tap which requires an ack.
- EXPECT_EQ(2U, GestureEventLastQueueEventSize());
-
- SimulateGestureEvent(WebInputEvent::GestureShowPress,
- WebGestureEvent::Touchscreen);
-
- EXPECT_EQ(0U, GetAndResetSentGestureEventCount());
- // ShowPress has entered the queue.
- EXPECT_EQ(3U, GestureEventLastQueueEventSize());
-
- SendInputEventACK(WebInputEvent::GestureTap,
- INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
-
- // Now that the Tap has been ACKed, the ShowPress events should fire
- // immediately.
- EXPECT_EQ(2U, GetAndResetSentGestureEventCount());
- EXPECT_EQ(0U, GestureEventLastQueueEventSize());
-}
-
// Test that a GestureScrollEnd | GestureFlingStart are deferred during the
// debounce interval, that Scrolls are not and that the deferred events are
// sent after that timer fires.

Powered by Google App Engine
This is Rietveld 408576698