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

Unified Diff: webkit/glue/devtools/devtools_rpc_unittest.cc

Issue 115862: DevTools: pass class and method name as arguments to RPC messages (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « webkit/glue/devtools/devtools_rpc.cc ('k') | webkit/glue/devtools/js/devtools.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/devtools/devtools_rpc_unittest.cc
===================================================================
--- webkit/glue/devtools/devtools_rpc_unittest.cc (revision 17071)
+++ webkit/glue/devtools/devtools_rpc_unittest.cc (working copy)
@@ -52,21 +52,28 @@
TEST_F(DevToolsRpcTests, TestSerialize) {
MockTestRpcClass mock;
mock.Method0();
- EXPECT_EQ("[\"TestRpcClass\",\"Method0\"]", mock.get_log());
+ EXPECT_EQ("TestRpcClass", mock.last_class_name());
+ EXPECT_EQ("Method0", mock.last_method_name());
+ EXPECT_EQ("[]", mock.last_msg());
mock.Reset();
mock.Method1(10);
- EXPECT_EQ("[\"TestRpcClass\",\"Method1\",10]", mock.get_log());
+ EXPECT_EQ("TestRpcClass", mock.last_class_name());
+ EXPECT_EQ("Method1", mock.last_method_name());
+ EXPECT_EQ("[10]", mock.last_msg());
mock.Reset();
mock.Method2(20, "foo");
- EXPECT_EQ("[\"TestRpcClass\",\"Method2\",20,\"foo\"]", mock.get_log());
+ EXPECT_EQ("TestRpcClass", mock.last_class_name());
+ EXPECT_EQ("Method2", mock.last_method_name());
+ EXPECT_EQ("[20,\"foo\"]", mock.last_msg());
mock.Reset();
StringValue value("bar");
mock.Method3(30, "foo", value);
- EXPECT_EQ("[\"TestRpcClass\",\"Method3\",30,\"foo\",\"bar\"]",
- mock.get_log());
+ EXPECT_EQ("TestRpcClass", mock.last_class_name());
+ EXPECT_EQ("Method3", mock.last_method_name());
+ EXPECT_EQ("[30,\"foo\",\"bar\"]", mock.last_msg());
mock.Reset();
}
@@ -82,7 +89,8 @@
remote.Method0();
remote.Replay();
- TestRpcClassDispatch::Dispatch(&remote, local.get_log());
+ TestRpcClassDispatch::Dispatch(&remote, local.last_class_name(),
+ local.last_method_name(), local.last_msg());
remote.Verify();
// Call 2.
@@ -91,7 +99,8 @@
remote.Reset();
remote.Method1(10);
remote.Replay();
- TestRpcClassDispatch::Dispatch(&remote, local.get_log());
+ TestRpcClassDispatch::Dispatch(&remote, local.last_class_name(),
+ local.last_method_name(), local.last_msg());
remote.Verify();
// Call 3.
@@ -101,7 +110,8 @@
remote.Method2(20, "foo");
remote.Replay();
- TestRpcClassDispatch::Dispatch(&remote, local.get_log());
+ TestRpcClassDispatch::Dispatch(&remote, local.last_class_name(),
+ local.last_method_name(), local.last_msg());
remote.Verify();
// Call 4.
@@ -112,7 +122,8 @@
remote.Method3(30, "foo", value);
remote.Replay();
- TestRpcClassDispatch::Dispatch(&remote, local.get_log());
+ TestRpcClassDispatch::Dispatch(&remote, local.last_class_name(),
+ local.last_method_name(), local.last_msg());
remote.Verify();
}
« no previous file with comments | « webkit/glue/devtools/devtools_rpc.cc ('k') | webkit/glue/devtools/js/devtools.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698