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

Unified Diff: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm

Issue 281723010: Bundle DidOverscrollParams with the InputEventAck (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix build Created 6 years, 7 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 | « content/browser/renderer_host/render_widget_host_view_base.h ('k') | content/common/input_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
diff --git a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
index c875c22eefb56be109bfe2fe8ea44a4dc4290f8f..1d12f90bec27543b7a1477e3dc2f1633d9532197 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac_unittest.mm
@@ -717,9 +717,11 @@ TEST_F(RenderWidgetHostViewMacTest, ScrollWheelEndEventDelivery) {
ASSERT_EQ(1U, process_host->sink().message_count());
// Send an ACK for the first wheel event, so that the queue will be flushed.
- scoped_ptr<IPC::Message> response(new InputHostMsg_HandleInputEvent_ACK(
- 0, blink::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_CONSUMED,
- ui::LatencyInfo()));
+ InputHostMsg_HandleInputEvent_ACK_Params ack;
+ ack.type = blink::WebInputEvent::MouseWheel;
+ ack.state = INPUT_EVENT_ACK_STATE_CONSUMED;
+ scoped_ptr<IPC::Message> response(
+ new InputHostMsg_HandleInputEvent_ACK(0, ack));
host->OnMessageReceived(*response);
// Post the NSEventPhaseEnded wheel event to NSApp and check whether the
@@ -761,9 +763,11 @@ TEST_F(RenderWidgetHostViewMacTest, IgnoreEmptyUnhandledWheelEvent) {
process_host->sink().ClearMessages();
// Indicate that the wheel event was unhandled.
- scoped_ptr<IPC::Message> response1(new InputHostMsg_HandleInputEvent_ACK(0,
- blink::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_NOT_CONSUMED,
- ui::LatencyInfo()));
+ InputHostMsg_HandleInputEvent_ACK_Params unhandled_ack;
+ unhandled_ack.type = blink::WebInputEvent::MouseWheel;
+ unhandled_ack.state = INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
+ scoped_ptr<IPC::Message> response1(
+ new InputHostMsg_HandleInputEvent_ACK(0, unhandled_ack));
host->OnMessageReceived(*response1);
// Check that the view delegate got an unhandled wheel event.
@@ -776,9 +780,8 @@ TEST_F(RenderWidgetHostViewMacTest, IgnoreEmptyUnhandledWheelEvent) {
ASSERT_EQ(1U, process_host->sink().message_count());
// Indicate that the wheel event was also unhandled.
- scoped_ptr<IPC::Message> response2(new InputHostMsg_HandleInputEvent_ACK(0,
- blink::WebInputEvent::MouseWheel, INPUT_EVENT_ACK_STATE_NOT_CONSUMED,
- ui::LatencyInfo()));
+ scoped_ptr<IPC::Message> response2(
+ new InputHostMsg_HandleInputEvent_ACK(0, unhandled_ack));
host->OnMessageReceived(*response2);
// Check that the view delegate ignored the empty unhandled wheel event.
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.h ('k') | content/common/input_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698