| Index: content/browser/renderer_host/input/input_router_impl_unittest.cc
|
| diff --git a/content/browser/renderer_host/input/input_router_impl_unittest.cc b/content/browser/renderer_host/input/input_router_impl_unittest.cc
|
| index 861ecaeefa8004ed06933875779aff2598ec5a36..aa91bd951c7d78a88feeebce4ea04c7564b2208e 100644
|
| --- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
|
| +++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
|
| @@ -274,6 +274,12 @@ class InputRouterImplTest : public testing::Test {
|
| return touch_event_id;
|
| }
|
|
|
| + void ProcessSyntheticInputEventAck(WebInputEvent::Type type) {
|
| + ui::LatencyInfo latency_info;
|
| + input_router_->ProcessInputEventAck(type, INPUT_EVENT_ACK_STATE_IGNORED,
|
| + latency_info, 0, InputRouterImpl::IGNORING_DISPOSITION);
|
| + }
|
| +
|
| int PressTouchPoint(int x, int y) {
|
| return touch_event_.PressPoint(x, y);
|
| }
|
| @@ -1103,6 +1109,9 @@ TEST_F(InputRouterImplTest, GestureTypesIgnoringAck) {
|
| EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
|
| EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
|
| EXPECT_EQ(0, client_->in_flight_event_count());
|
| +
|
| + if (type == WebInputEvent::GestureScrollBegin)
|
| + ProcessSyntheticInputEventAck(WebInputEvent::TouchScrollStarted);
|
| EXPECT_FALSE(HasPendingEvents());
|
| }
|
| }
|
| @@ -1233,7 +1242,6 @@ TEST_F(InputRouterImplTest, GestureShowPressIsInOrder) {
|
| EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
|
| EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
|
|
|
| -
|
| // GesturePinchBegin ignores its ack.
|
| SimulateGestureEvent(WebInputEvent::GesturePinchBegin,
|
| blink::WebGestureDeviceTouchscreen);
|
| @@ -1692,6 +1700,7 @@ TEST_F(InputRouterImplTest, InputFlushAfterFling) {
|
| blink::WebGestureDeviceTouchscreen);
|
| SimulateGestureEvent(WebInputEvent::GestureFlingStart,
|
| blink::WebGestureDeviceTouchscreen);
|
| + ProcessSyntheticInputEventAck(WebInputEvent::TouchScrollStarted);
|
| EXPECT_TRUE(HasPendingEvents());
|
|
|
| // If the fling is unconsumed, the flush is complete.
|
| @@ -1701,7 +1710,9 @@ TEST_F(InputRouterImplTest, InputFlushAfterFling) {
|
| blink::WebGestureDeviceTouchscreen);
|
| SendInputEventACK(WebInputEvent::GestureFlingStart,
|
| INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
|
| + ProcessSyntheticInputEventAck(WebInputEvent::TouchScrollStarted);
|
| EXPECT_FALSE(HasPendingEvents());
|
| +
|
| EXPECT_EQ(1U, GetAndResetDidFlushCount());
|
|
|
| // Simulate a second fling.
|
| @@ -1728,6 +1739,7 @@ TEST_F(InputRouterImplTest, InputFlushAfterFling) {
|
| blink::WebGestureDeviceTouchscreen);
|
| SimulateGestureEvent(WebInputEvent::GestureFlingStart,
|
| blink::WebGestureDeviceTouchscreen);
|
| + ProcessSyntheticInputEventAck(WebInputEvent::TouchScrollStarted);
|
| ASSERT_TRUE(HasPendingEvents());
|
| RequestNotificationWhenFlushed();
|
| EXPECT_EQ(0U, GetAndResetDidFlushCount());
|
|
|