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

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

Issue 1405613002: Support vsync-aligned wheel event dispatch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@input_cleanup_todo
Patch Set: Rebase Created 5 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/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 fbbddb1906d915203bcea0ca54439b3dcccd4ca7..3e613f5b4d503dd22062c9ded025502e89bb84ea 100644
--- a/content/browser/renderer_host/input/input_router_impl_unittest.cc
+++ b/content/browser/renderer_host/input/input_router_impl_unittest.cc
@@ -1759,9 +1759,10 @@ TEST_F(InputRouterImplTest, TouchpadPinchAndScrollUpdate) {
EXPECT_EQ(1, client_->in_flight_event_count());
// Ack'ing the first scroll should trigger both the coalesced scroll and the
- // coalesced pinch events (which is sent to the renderer as a wheel event).
+ // coalesced pinch events.
SendInputEventACK(WebInputEvent::GestureScrollUpdate,
INPUT_EVENT_ACK_STATE_CONSUMED);
+ EXPECT_EQ(WebInputEvent::GestureScrollUpdate, ack_handler_->ack_event_type());
EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
EXPECT_EQ(2U, GetSentMessageCountAndResetSink());
EXPECT_EQ(2, client_->in_flight_event_count());
@@ -1770,12 +1771,15 @@ TEST_F(InputRouterImplTest, TouchpadPinchAndScrollUpdate) {
SendInputEventACK(WebInputEvent::GestureScrollUpdate,
INPUT_EVENT_ACK_STATE_CONSUMED);
EXPECT_EQ(0U, GetSentMessageCountAndResetSink());
+ EXPECT_EQ(WebInputEvent::GestureScrollUpdate, ack_handler_->ack_event_type());
EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
EXPECT_EQ(1, client_->in_flight_event_count());
// Ack the wheel event.
- SendInputEventACK(WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_CONSUMED);
+ SendInputEventACK(WebInputEvent::GesturePinchUpdate,
+ INPUT_EVENT_ACK_STATE_CONSUMED);
EXPECT_EQ(0U, GetSentMessageCountAndResetSink());
+ EXPECT_EQ(WebInputEvent::GesturePinchUpdate, ack_handler_->ack_event_type());
EXPECT_EQ(1U, ack_handler_->GetAndResetAckCount());
EXPECT_EQ(0, client_->in_flight_event_count());
}
« no previous file with comments | « content/browser/renderer_host/input/input_router_impl.cc ('k') | content/browser/renderer_host/input/wheel_event_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698