Chromium Code Reviews| 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 d0e5634de62f1413f986ab26731c366883ed32ab..1d3105697a3f272e38395764e5a4e33d8b3aa3bc 100644 |
| --- a/content/browser/renderer_host/input/input_router_impl_unittest.cc |
| +++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc |
| @@ -1026,19 +1026,41 @@ TEST_F(InputRouterImplTest, UnhandledWheelEvent) { |
| // were processed. |
| EXPECT_EQ(2U, ack_handler_->GetAndResetAckCount()); |
| - // There should be a ScrollBegin and ScrollUpdate, MouseWheel sent |
| + // There should be a ScrollBegin and ScrollUpdate, MouseWheel sent. |
| EXPECT_EQ(3U, GetSentMessageCountAndResetSink()); |
| EXPECT_EQ(ack_handler_->acked_wheel_event().deltaY, -5); |
| SendInputEventACK(WebInputEvent::GestureScrollUpdate, |
| INPUT_EVENT_ACK_STATE_CONSUMED); |
| + |
| + // There should be a ScrollEnd sent. |
|
dtapuska
2017/03/29 17:49:03
Can we adjust this comment so it indicates the Ges
sahel
2017/03/29 20:10:43
Done.
|
| + EXPECT_EQ(1U, GetSentMessageCountAndResetSink()); |
| + |
| + // Check that the ack for the ScrollUpdate and ScrollEnd |
| + // were processed. |
| + EXPECT_EQ(2U, ack_handler_->GetAndResetAckCount()); |
| + |
| SendInputEventACK(WebInputEvent::MouseWheel, |
| INPUT_EVENT_ACK_STATE_NOT_CONSUMED); |
| + // There should be a ScrollBegin and ScrollUpdate sent. |
| + EXPECT_EQ(2U, GetSentMessageCountAndResetSink()); |
| + |
| // Check that the correct unhandled wheel event was received. |
| EXPECT_EQ(2U, ack_handler_->GetAndResetAckCount()); |
| - EXPECT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, ack_handler_->ack_state()); |
| + EXPECT_EQ(INPUT_EVENT_ACK_STATE_NOT_CONSUMED, |
| + ack_handler_->acked_wheel_event_state()); |
| EXPECT_EQ(ack_handler_->acked_wheel_event().deltaY, -10); |
| + |
| + SendInputEventACK(WebInputEvent::GestureScrollUpdate, |
| + INPUT_EVENT_ACK_STATE_CONSUMED); |
| + |
| + // There should be a ScrollEnd sent. |
|
dtapuska
2017/03/29 17:49:03
Same.. the event is already "sent" from the mouse_
sahel
2017/03/29 20:10:43
Done.
|
| + EXPECT_EQ(1U, GetSentMessageCountAndResetSink()); |
| + |
| + // Check that the ack for the ScrollUpdate and ScrollEnd |
| + // were processed. |
| + EXPECT_EQ(2U, ack_handler_->GetAndResetAckCount()); |
| } |
| TEST_F(InputRouterImplTest, TouchTypesIgnoringAck) { |