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

Unified Diff: content/browser/renderer_host/resource_dispatcher_host_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 | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/zygote_host_impl_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/resource_dispatcher_host_unittest.cc
diff --git a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
index 33723d2cc3e7d134c192f6bc6cae34f5a664d4ef..65b2f3c049e7f4441b52cfb79cca46c820c31dff 100644
--- a/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
+++ b/content/browser/renderer_host/resource_dispatcher_host_unittest.cc
@@ -55,7 +55,7 @@ void GetResponseHead(const std::vector<IPC::Message>& messages,
// The first messages should be received response.
ASSERT_EQ(ResourceMsg_ReceivedResponse::ID, messages[0].type());
- void* iter = NULL;
+ PickleIterator iter(messages[0]);
int request_id;
ASSERT_TRUE(IPC::ReadParam(&messages[0], &iter, &request_id));
ASSERT_TRUE(IPC::ReadParam(&messages[0], &iter, response_head));
@@ -539,7 +539,7 @@ void CheckSuccessfulRequest(const std::vector<IPC::Message>& messages,
// should probably test multiple chunks later
ASSERT_EQ(ResourceMsg_DataReceived::ID, messages[1].type());
- void* iter = NULL;
+ PickleIterator iter(messages[1]);
int request_id;
ASSERT_TRUE(IPC::ReadParam(&messages[1], &iter, &request_id));
base::SharedMemoryHandle shm_handle;
@@ -618,7 +618,7 @@ TEST_F(ResourceDispatcherHostTest, Cancel) {
int request_id;
net::URLRequestStatus status;
- void* iter = NULL;
+ PickleIterator iter(msgs[1][1]);
ASSERT_TRUE(IPC::ReadParam(&msgs[1][1], &iter, &request_id));
ASSERT_TRUE(IPC::ReadParam(&msgs[1][1], &iter, &status));
@@ -695,7 +695,7 @@ TEST_F(ResourceDispatcherHostTest, PausedCancel) {
int request_id;
net::URLRequestStatus status;
- void* iter = NULL;
+ PickleIterator iter(msgs[0][1]);
ASSERT_TRUE(IPC::ReadParam(&msgs[0][1], &iter, &request_id));
ASSERT_TRUE(IPC::ReadParam(&msgs[0][1], &iter, &status));
@@ -1069,7 +1069,7 @@ TEST_F(ResourceDispatcherHostTest, TooManyOutstandingRequests) {
int request_id;
net::URLRequestStatus status;
- void* iter = NULL;
+ PickleIterator iter(msgs[index][0]);
EXPECT_TRUE(IPC::ReadParam(&msgs[index][0], &iter, &request_id));
EXPECT_TRUE(IPC::ReadParam(&msgs[index][0], &iter, &status));
@@ -1233,7 +1233,7 @@ TEST_F(ResourceDispatcherHostTest, ForbiddenDownload) {
int request_id;
net::URLRequestStatus status;
- void* iter = NULL;
+ PickleIterator iter(msgs[0][0]);
EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &request_id));
EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &status));
@@ -1387,7 +1387,7 @@ TEST_F(ResourceDispatcherHostTest, UnknownURLScheme) {
int request_id;
net::URLRequestStatus status;
- void* iter = NULL;
+ PickleIterator iter(msgs[0][0]);
EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &request_id));
EXPECT_TRUE(IPC::ReadParam(&msgs[0][0], &iter, &status));
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.cc ('k') | content/browser/zygote_host_impl_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698