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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 283623002: Add support for passing an arbitrary parameter to an IPC message handler. The motivation is for Web… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync 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
Index: content/browser/renderer_host/render_widget_host_unittest.cc
===================================================================
--- content/browser/renderer_host/render_widget_host_unittest.cc (revision 270218)
+++ content/browser/renderer_host/render_widget_host_unittest.cc (working copy)
@@ -2242,15 +2242,13 @@
}
std::string GetInputMessageTypes(RenderWidgetHostProcess* process) {
- const WebInputEvent* event = NULL;
- ui::LatencyInfo latency_info;
- bool is_keyboard_shortcut;
std::string result;
for (size_t i = 0; i < process->sink().message_count(); ++i) {
const IPC::Message *message = process->sink().GetMessageAt(i);
EXPECT_EQ(InputMsg_HandleInputEvent::ID, message->type());
- EXPECT_TRUE(InputMsg_HandleInputEvent::Read(
- message, &event, &latency_info, &is_keyboard_shortcut));
+ InputMsg_HandleInputEvent::Param params;
+ EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, &params));
+ const WebInputEvent* event = params.a;
if (i != 0)
result += " ";
result += WebInputEventTraits::GetName(event->type);
@@ -2573,14 +2571,12 @@
void CheckLatencyInfoComponentInMessage(RenderWidgetHostProcess* process,
int64 component_id,
WebInputEvent::Type input_type) {
- const WebInputEvent* event = NULL;
- ui::LatencyInfo latency_info;
- bool is_keyboard_shortcut;
const IPC::Message* message = process->sink().GetUniqueMessageMatching(
InputMsg_HandleInputEvent::ID);
ASSERT_TRUE(message);
- EXPECT_TRUE(InputMsg_HandleInputEvent::Read(
- message, &event, &latency_info, &is_keyboard_shortcut));
+ InputMsg_HandleInputEvent::Param params;
+ EXPECT_TRUE(InputMsg_HandleInputEvent::Read(message, &params));
+ ui::LatencyInfo latency_info = params.b;
EXPECT_TRUE(latency_info.FindLatency(
ui::INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
component_id,
« no previous file with comments | « content/browser/renderer_host/render_message_filter.cc ('k') | content/browser/shared_worker/shared_worker_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698