| 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 f56991892266ceeca85f3a84ec97a7d01d5d3f37..83aab3819eea090c42fd97bfd83c813688d2bd5e 100644
|
| --- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
|
| +++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
|
| @@ -276,10 +276,6 @@ class InputRouterImplTest : public testing::Test {
|
| input_router_->OnMessageReceived(InputHostMsg_HandleInputEvent_ACK(0, ack));
|
| }
|
|
|
| - void NotifyDidStopFlinging() {
|
| - input_router_->OnMessageReceived(InputHostMsg_DidStopFlinging(0));
|
| - }
|
| -
|
| InputRouterImpl* input_router() const {
|
| return input_router_.get();
|
| }
|
| @@ -1023,7 +1019,6 @@ TEST_F(InputRouterImplTest, GestureTypesIgnoringAck) {
|
| WebInputEvent::GestureScrollEnd};
|
| for (size_t i = 0; i < arraysize(eventTypes); ++i) {
|
| WebInputEvent::Type type = eventTypes[i];
|
| - SCOPED_TRACE(WebInputEventTraits::GetName(type));
|
| if (!WebInputEventTraits::IgnoresAckDisposition(GetEventWithType(type))) {
|
| SimulateGestureEvent(type, blink::WebGestureDeviceTouchscreen);
|
| EXPECT_EQ(1U, GetSentMessageCountAndResetSink());
|
| @@ -1031,20 +1026,11 @@ TEST_F(InputRouterImplTest, GestureTypesIgnoringAck) {
|
| EXPECT_EQ(1, client_->in_flight_event_count());
|
| EXPECT_TRUE(HasPendingEvents());
|
|
|
| - SendInputEventACK(type, INPUT_EVENT_ACK_STATE_CONSUMED);
|
| + SendInputEventACK(type, INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
|
| EXPECT_EQ(0U, GetSentMessageCountAndResetSink());
|
| EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
|
| EXPECT_EQ(0, client_->in_flight_event_count());
|
| -
|
| - // A GestureFlingCancel will be dropped unless there's an active
|
| - // fling, and an active fling is considered a "pending" event. This rather
|
| - // nasty bookkeeping is necessary to ensure the fling cancel gets properly
|
| - // dispatched and the pending event expectations are valid.
|
| - if (type == blink::WebInputEvent::GestureFlingCancel)
|
| - NotifyDidStopFlinging();
|
| - if (type != blink::WebInputEvent::GestureFlingStart)
|
| - EXPECT_FALSE(HasPendingEvents());
|
| -
|
| + EXPECT_FALSE(HasPendingEvents());
|
| continue;
|
| }
|
|
|
| @@ -1615,47 +1601,6 @@ TEST_F(InputRouterImplTest, InputFlush) {
|
| EXPECT_FALSE(HasPendingEvents());
|
| }
|
|
|
| -// Test that the router will call the client's |DidFlush| after all fling
|
| -// animations have completed.
|
| -TEST_F(InputRouterImplTest, InputFlushAfterFling) {
|
| - EXPECT_FALSE(HasPendingEvents());
|
| -
|
| - // Simulate a fling.
|
| - SimulateGestureEvent(WebInputEvent::GestureScrollBegin,
|
| - blink::WebGestureDeviceTouchscreen);
|
| - SimulateGestureEvent(WebInputEvent::GestureFlingStart,
|
| - blink::WebGestureDeviceTouchscreen);
|
| - EXPECT_TRUE(HasPendingEvents());
|
| -
|
| - // If the fling is unconsumed, the flush is complete.
|
| - RequestNotificationWhenFlushed();
|
| - EXPECT_EQ(0U, GetAndResetDidFlushCount());
|
| - SimulateGestureEvent(WebInputEvent::GestureScrollBegin,
|
| - blink::WebGestureDeviceTouchscreen);
|
| - SendInputEventACK(WebInputEvent::GestureFlingStart,
|
| - INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
|
| - EXPECT_FALSE(HasPendingEvents());
|
| - EXPECT_EQ(1U, GetAndResetDidFlushCount());
|
| -
|
| - // Simulate a second fling.
|
| - SimulateGestureEvent(WebInputEvent::GestureFlingStart,
|
| - blink::WebGestureDeviceTouchscreen);
|
| - EXPECT_TRUE(HasPendingEvents());
|
| -
|
| - // If the fling is consumed, the flush is complete only when the renderer
|
| - // reports that is has ended.
|
| - RequestNotificationWhenFlushed();
|
| - EXPECT_EQ(0U, GetAndResetDidFlushCount());
|
| - SendInputEventACK(WebInputEvent::GestureFlingStart,
|
| - INPUT_EVENT_ACK_STATE_CONSUMED);
|
| - EXPECT_TRUE(HasPendingEvents());
|
| - EXPECT_EQ(0U, GetAndResetDidFlushCount());
|
| -
|
| - // The fling end notification should signal that the router is flushed.
|
| - NotifyDidStopFlinging();
|
| - EXPECT_EQ(1U, GetAndResetDidFlushCount());
|
| -}
|
| -
|
| // Test that GesturePinchUpdate is handled specially for trackpad
|
| TEST_F(InputRouterImplTest, TouchpadPinchUpdate) {
|
| // GesturePinchUpdate for trackpad sends synthetic wheel events.
|
|
|