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

Unified Diff: content/browser/shared_worker/shared_worker_service_impl_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/shared_worker/shared_worker_service_impl_unittest.cc
===================================================================
--- content/browser/shared_worker/shared_worker_service_impl_unittest.cc (revision 270218)
+++ content/browser/shared_worker/shared_worker_service_impl_unittest.cc (working copy)
@@ -357,8 +357,10 @@
scoped_ptr<IPC::Message> msg(renderer_host->PopMessage());
EXPECT_EQ(WorkerMsg_Connect::ID, msg->type());
EXPECT_EQ(expected_msg_route_id, msg->routing_id());
- int port_id;
- EXPECT_TRUE(WorkerMsg_Connect::Read(msg.get(), &port_id, routing_id));
+ WorkerMsg_Connect::Param params;
+ EXPECT_TRUE(WorkerMsg_Connect::Read(msg.get(), &params));
+ int port_id = params.a;
+ *routing_id = params.b;
EXPECT_EQ(expected_sent_message_port_id, port_id);
}
@@ -368,11 +370,9 @@
scoped_ptr<IPC::Message> msg(renderer_host->PopMessage());
EXPECT_EQ(MessagePortMsg_Message::ID, msg->type());
EXPECT_EQ(expected_msg_route_id, msg->routing_id());
- base::string16 data;
- std::vector<int> sent_message_port_ids;
- std::vector<int> new_routing_ids;
- EXPECT_TRUE(MessagePortMsg_Message::Read(
- msg.get(), &data, &sent_message_port_ids, &new_routing_ids));
+ MessagePortMsg_Message::Param params;
+ EXPECT_TRUE(MessagePortMsg_Message::Read(msg.get(), &params));
+ base::string16 data = params.a;
EXPECT_EQ(base::ASCIIToUTF16(expected_data), data);
}
« no previous file with comments | « content/browser/shared_worker/shared_worker_host.cc ('k') | content/browser/worker_host/worker_process_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698