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

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: compile (racing with incoming CLs) Created 8 years, 9 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 | « ipc/ipc_message.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_message_unittest.cc
diff --git a/ipc/ipc_message_unittest.cc b/ipc/ipc_message_unittest.cc
index 7339e308770776d02b28e06f24af767866c9c2f0..2f50ee3200c147ddd91f3ce39a197d106a2cea06 100644
--- a/ipc/ipc_message_unittest.cc
+++ b/ipc/ipc_message_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,7 +21,7 @@ TEST(IPCMessageTest, ListValue) {
IPC::WriteParam(&msg, input);
ListValue output;
- void* iter = NULL;
+ PickleIterator 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 = PickleIterator(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;
+ PickleIterator 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 = PickleIterator(bad_msg);
EXPECT_FALSE(IPC::ReadParam(&bad_msg, &iter, &output));
}
« no previous file with comments | « ipc/ipc_message.cc ('k') | ipc/ipc_message_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698