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

Unified Diff: chrome/browser/policy/cloud/test_request_interceptor.cc

Issue 1414983002: Make URLRequestTestJob accept \n terminated header lines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments mmenke Created 5 years, 2 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 | « no previous file | components/certificate_transparency/log_proof_fetcher_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/cloud/test_request_interceptor.cc
diff --git a/chrome/browser/policy/cloud/test_request_interceptor.cc b/chrome/browser/policy/cloud/test_request_interceptor.cc
index 78b5511f0702d7a7a14cdb8fc9f07ed1dc0d4014..9f3a516ae23ba751dbe223bd2673cc1ee46990b0 100644
--- a/chrome/browser/policy/cloud/test_request_interceptor.cc
+++ b/chrome/browser/policy/cloud/test_request_interceptor.cc
@@ -44,9 +44,9 @@ net::URLRequestJob* BadRequestJobCallback(
net::URLRequest* request,
net::NetworkDelegate* network_delegate) {
static const char kBadHeaders[] =
- "HTTP/1.1 400 Bad request\0"
- "Content-type: application/protobuf\0"
- "\0";
+ "HTTP/1.1 400 Bad request\n"
+ "Content-type: application/protobuf\n"
+ "\n";
std::string headers(kBadHeaders, arraysize(kBadHeaders));
return new net::URLRequestTestJob(
request, network_delegate, headers, std::string(), true);
@@ -141,9 +141,9 @@ net::URLRequestJob* RegisterJobCallback(
response.SerializeToString(&data);
static const char kGoodHeaders[] =
- "HTTP/1.1 200 OK\0"
- "Content-type: application/protobuf\0"
- "\0";
+ "HTTP/1.1 200 OK\n"
+ "Content-type: application/protobuf\n"
+ "\n";
std::string headers(kGoodHeaders, arraysize(kGoodHeaders));
return new net::URLRequestTestJob(
request, network_delegate, headers, data, true);
« no previous file with comments | « no previous file | components/certificate_transparency/log_proof_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698