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

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

Issue 2782733002: MouseWheelEventQueue sends scrollEnd right away when latching is disabled. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/mock_input_ack_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4316530ca85f4b03251e2bff44c107ec312cd764 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -1032,13 +1032,35 @@ TEST_F(InputRouterImplTest, UnhandledWheelEvent) {
EXPECT_EQ(ack_handler_->acked_wheel_event().deltaY, -5);
SendInputEventACK(WebInputEvent::GestureScrollUpdate,
INPUT_EVENT_ACK_STATE_CONSUMED);
+
+ // There should be a ScrollEnd sent
tdresser 2017/03/29 16:55:32 Missing "." Same below.
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
+ 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) {
« no previous file with comments | « no previous file | content/browser/renderer_host/input/mock_input_ack_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698