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

Side by Side Diff: content/browser/loader/resource_dispatcher_host_unittest.cc

Issue 1346923008: Add a dummy variable to ResourceMsg_DataReceived. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ipc_revert2
Patch Set: Fix unit test error. Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « content/browser/loader/async_resource_handler.cc ('k') | content/child/resource_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <vector> 5 #include <vector>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 ASSERT_EQ(expected_error_code, error_code); 1147 ASSERT_EQ(expected_error_code, error_code);
1148 } 1148 }
1149 1149
1150 testing::AssertionResult ExtractDataOffsetAndLength(const IPC::Message& message, 1150 testing::AssertionResult ExtractDataOffsetAndLength(const IPC::Message& message,
1151 int* data_offset, 1151 int* data_offset,
1152 int* data_length) { 1152 int* data_length) {
1153 base::PickleIterator iter(message); 1153 base::PickleIterator iter(message);
1154 int request_id; 1154 int request_id;
1155 if (!IPC::ReadParam(&message, &iter, &request_id)) 1155 if (!IPC::ReadParam(&message, &iter, &request_id))
1156 return testing::AssertionFailure() << "Could not read request_id"; 1156 return testing::AssertionFailure() << "Could not read request_id";
1157 // TODO(erikchen): This dummy variable is temporary and is only intended to be
1158 // present for one Canary release. http://crbug.com/527588.
1159 int dummy;
1160 if (!IPC::ReadParam(&message, &iter, &dummy))
1161 return testing::AssertionFailure() << "Could not read dummy variable";
1157 if (!IPC::ReadParam(&message, &iter, data_offset)) 1162 if (!IPC::ReadParam(&message, &iter, data_offset))
1158 return testing::AssertionFailure() << "Could not read data_offset"; 1163 return testing::AssertionFailure() << "Could not read data_offset";
1159 if (!IPC::ReadParam(&message, &iter, data_length)) 1164 if (!IPC::ReadParam(&message, &iter, data_length))
1160 return testing::AssertionFailure() << "Could not read data_length"; 1165 return testing::AssertionFailure() << "Could not read data_length";
1161 return testing::AssertionSuccess(); 1166 return testing::AssertionSuccess();
1162 } 1167 }
1163 1168
1164 void CheckSuccessfulRequestWithErrorCode( 1169 void CheckSuccessfulRequestWithErrorCode(
1165 const std::vector<IPC::Message>& messages, 1170 const std::vector<IPC::Message>& messages,
1166 const std::string& reference_data, 1171 const std::string& reference_data,
(...skipping 2321 matching lines...) Expand 10 before | Expand all | Expand 10 after
3488 return nullptr; 3493 return nullptr;
3489 } 3494 }
3490 3495
3491 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse( 3496 net::URLRequestJob* TestURLRequestJobFactory::MaybeInterceptResponse(
3492 net::URLRequest* request, 3497 net::URLRequest* request,
3493 net::NetworkDelegate* network_delegate) const { 3498 net::NetworkDelegate* network_delegate) const {
3494 return nullptr; 3499 return nullptr;
3495 } 3500 }
3496 3501
3497 } // namespace content 3502 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/loader/async_resource_handler.cc ('k') | content/child/resource_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698