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

Unified Diff: ipc/ipc_message_unittest.cc

Issue 9447084: Refactor Pickle Read methods to use higher performance PickleIterator. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: jar feedback Created 8 years, 10 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: ipc/ipc_message_unittest.cc
diff --git a/ipc/ipc_message_unittest.cc b/ipc/ipc_message_unittest.cc
index 7339e308770776d02b28e06f24af767866c9c2f0..81db69061e96ba64281f16e4c0524a2f1e1e5ad8 100644
--- a/ipc/ipc_message_unittest.cc
+++ b/ipc/ipc_message_unittest.cc
@@ -21,7 +21,7 @@ TEST(IPCMessageTest, ListValue) {
IPC::WriteParam(&msg, input);
ListValue output;
- void* iter = NULL;
+ PickleReader iter(msg);
EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output));
EXPECT_TRUE(input.Equals(&output));
@@ -29,7 +29,7 @@ TEST(IPCMessageTest, ListValue) {
// Also test the corrupt case.
IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL);
bad_msg.WriteInt(99);
- iter = NULL;
+ iter = PickleReader(bad_msg);
EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output));
}
@@ -56,7 +56,7 @@ TEST(IPCMessageTest, DictionaryValue) {
IPC::WriteParam(&msg, input);
DictionaryValue output;
- void* iter = NULL;
+ PickleReader iter(msg);
EXPECT_TRUE(IPC::ReadParam(&msg, &iter, &output));
EXPECT_TRUE(input.Equals(&output));
@@ -64,6 +64,6 @@ TEST(IPCMessageTest, DictionaryValue) {
// Also test the corrupt case.
IPC::Message bad_msg(1, 2, IPC::Message::PRIORITY_NORMAL);
bad_msg.WriteInt(99);
- iter = NULL;
+ iter = PickleReader(bad_msg);
EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output));
}

Powered by Google App Engine
This is Rietveld 408576698