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

Unified Diff: content/renderer/browser_plugin/browser_plugin_browsertest.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
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/browser_plugin/browser_plugin_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin_browsertest.cc
===================================================================
--- content/renderer/browser_plugin/browser_plugin_browsertest.cc (revision 270218)
+++ content/renderer/browser_plugin/browser_plugin_browsertest.cc (working copy)
@@ -269,9 +269,9 @@
BrowserPluginHostMsg_NavigateGuest::ID);
ASSERT_TRUE(msg);
- int instance_id = 0;
- std::string src;
- BrowserPluginHostMsg_NavigateGuest::Read(msg, &instance_id, &src);
+ BrowserPluginHostMsg_NavigateGuest::Param params;
+ BrowserPluginHostMsg_NavigateGuest::Read(msg, &params);
+ std::string src = params.b;
EXPECT_EQ("bar", src);
std::string src_value =
ExecuteScriptAndReturnString(
@@ -328,8 +328,10 @@
browser_plugin_manager()->sink().GetUniqueMessageMatching(
BrowserPluginHostMsg_ResizeGuest::ID);
ASSERT_TRUE(msg);
- BrowserPluginHostMsg_ResizeGuest_Params params;
- BrowserPluginHostMsg_ResizeGuest::Read(msg, &instance_id, &params);
+ BrowserPluginHostMsg_ResizeGuest::Param param;
+ BrowserPluginHostMsg_ResizeGuest::Read(msg, &param);
+ instance_id = param.a;
+ BrowserPluginHostMsg_ResizeGuest_Params params = param.b;
EXPECT_EQ(641, params.view_rect.width());
EXPECT_EQ(480, params.view_rect.height());
@@ -576,13 +578,10 @@
BrowserPluginHostMsg_SetAutoSize::ID);
ASSERT_TRUE(auto_size_msg);
- int instance_id = 0;
- BrowserPluginHostMsg_AutoSize_Params auto_size_params;
- BrowserPluginHostMsg_ResizeGuest_Params resize_params;
- BrowserPluginHostMsg_SetAutoSize::Read(auto_size_msg,
- &instance_id,
- &auto_size_params,
- &resize_params);
+ BrowserPluginHostMsg_SetAutoSize::Param param;
+ BrowserPluginHostMsg_SetAutoSize::Read(auto_size_msg, &param);
+ BrowserPluginHostMsg_AutoSize_Params auto_size_params = param.b;
+ BrowserPluginHostMsg_ResizeGuest_Params resize_params = param.c;
EXPECT_FALSE(auto_size_params.enable);
// These value are not populated (as an optimization) if autosize is
// disabled.
« no previous file with comments | « content/common/view_messages.h ('k') | content/renderer/browser_plugin/browser_plugin_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698