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

Side by Side Diff: content/browser/renderer_host/input/immediate_input_router_unittest.cc

Issue 19670007: Send input event's LatencyInfo back from renderer to browser when acked (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: fix compile error in immediate_input_router_unittest.cc Created 7 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "content/browser/renderer_host/input/gesture_event_filter.h" 8 #include "content/browser/renderer_host/input/gesture_event_filter.h"
9 #include "content/browser/renderer_host/input/immediate_input_router.h" 9 #include "content/browser/renderer_host/input/immediate_input_router.h"
10 #include "content/browser/renderer_host/input/input_router_client.h" 10 #include "content/browser/renderer_host/input/input_router_client.h"
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 input_router_.reset(); 356 input_router_.reset();
357 client_.reset(); 357 client_.reset();
358 process_.reset(); 358 process_.reset();
359 browser_context_.reset(); 359 browser_context_.reset();
360 } 360 }
361 361
362 void SendInputEventACK(WebInputEvent::Type type, 362 void SendInputEventACK(WebInputEvent::Type type,
363 InputEventAckState ack_result) { 363 InputEventAckState ack_result) {
364 scoped_ptr<IPC::Message> response( 364 scoped_ptr<IPC::Message> response(
365 new InputHostMsg_HandleInputEvent_ACK(0, type, ack_result)); 365 new InputHostMsg_HandleInputEvent_ACK(0, type, ack_result,
366 ui::LatencyInfo()));
366 input_router_->OnMessageReceived(*response); 367 input_router_->OnMessageReceived(*response);
367 } 368 }
368 369
369 void SimulateKeyboardEvent(WebInputEvent::Type type) { 370 void SimulateKeyboardEvent(WebInputEvent::Type type) {
370 NativeWebKeyboardEvent key_event; 371 NativeWebKeyboardEvent key_event;
371 key_event.type = type; 372 key_event.type = type;
372 key_event.windowsKeyCode = ui::VKEY_L; // non-null made up value. 373 key_event.windowsKeyCode = ui::VKEY_L; // non-null made up value.
373 input_router_->SendKeyboardEvent(key_event, ui::LatencyInfo()); 374 input_router_->SendKeyboardEvent(key_event, ui::LatencyInfo());
374 client_->ExpectSendCalled(true); 375 client_->ExpectSendCalled(true);
375 EXPECT_EQ(type, client_->sent_key_event().type); 376 EXPECT_EQ(type, client_->sent_key_event().type);
(...skipping 1782 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 EXPECT_EQ(1U, process_->sink().message_count()); 2159 EXPECT_EQ(1U, process_->sink().message_count());
2159 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching( 2160 EXPECT_TRUE(process_->sink().GetUniqueMessageMatching(
2160 InputMsg_HandleInputEvent::ID)); 2161 InputMsg_HandleInputEvent::ID));
2161 process_->sink().ClearMessages(); 2162 process_->sink().ClearMessages();
2162 2163
2163 // Check that the correct unhandled wheel event was received. 2164 // Check that the correct unhandled wheel event was received.
2164 EXPECT_EQ(client_->acked_wheel_event().deltaY, -5); 2165 EXPECT_EQ(client_->acked_wheel_event().deltaY, -5);
2165 } 2166 }
2166 2167
2167 } // namespace content 2168 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/immediate_input_router.cc ('k') | content/browser/renderer_host/input/touch_event_queue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698