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

Unified Diff: content/public/test/test_download_request_handler.cc

Issue 2819483002: Parallel download browser test. (Closed)
Patch Set: Fix compiling. Created 3 years, 8 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/public/test/test_download_request_handler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/test_download_request_handler.cc
diff --git a/content/public/test/test_download_request_handler.cc b/content/public/test/test_download_request_handler.cc
index 180f37f22ca89108f2ee2ad4076b183e35a7c511..d7d05a85c6e32c459bdca7b12bd778a94e374727 100644
--- a/content/public/test/test_download_request_handler.cc
+++ b/content/public/test/test_download_request_handler.cc
@@ -412,6 +412,7 @@ void TestDownloadRequestHandler::PartialResponseJob::HandleOnStartDefault() {
HeadersFromString(base::StringPrintf("HTTP/1.1 200 Success\r\n"
"Content-Length: %" PRId64 "\r\n",
parameters_->size));
+ response_info_.connection_info = parameters_->connection_type;
AddCommonEntityHeaders();
NotifyHeadersCompleteAndPrepareToRead();
return;
@@ -454,6 +455,7 @@ bool TestDownloadRequestHandler::PartialResponseJob::
"Content-Length: %" PRId64 "\r\n",
requested_range_begin_, requested_range_end_, parameters_->size,
(requested_range_end_ - requested_range_begin_) + 1));
+ response_info_.connection_info = parameters_->connection_type;
AddCommonEntityHeaders();
NotifyHeadersCompleteAndPrepareToRead();
return true;
@@ -585,7 +587,9 @@ TestDownloadRequestHandler::Parameters::Parameters()
content_type("application/octet-stream"),
size(102400),
pattern_generator_seed(1),
- support_byte_ranges(true) {}
+ support_byte_ranges(true),
+ connection_type(
+ net::HttpResponseInfo::ConnectionInfo::CONNECTION_INFO_UNKNOWN) {}
// Copy and move constructors / assignment operators are all defaults.
TestDownloadRequestHandler::Parameters::Parameters(const Parameters&) = default;
@@ -599,6 +603,7 @@ TestDownloadRequestHandler::Parameters::Parameters(Parameters&& that)
size(that.size),
pattern_generator_seed(that.pattern_generator_seed),
support_byte_ranges(that.support_byte_ranges),
+ connection_type(that.connection_type),
on_start_handler(that.on_start_handler),
injected_errors(std::move(that.injected_errors)) {}
« no previous file with comments | « content/public/test/test_download_request_handler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698