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

Unified Diff: net/url_request/url_request_job_unittest.cc

Issue 2886483002: Adds a new class HttpCache::Writers for multiple cache transactions reading from the network. (Closed)
Patch Set: Comment changed. Created 3 years, 5 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 | « net/http/http_transaction_test_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_job_unittest.cc
diff --git a/net/url_request/url_request_job_unittest.cc b/net/url_request/url_request_job_unittest.cc
index 4546552eeca5ac59ded4d9281949776d23da12b7..6057b4962f9557f016d87676d4c806364efec191 100644
--- a/net/url_request/url_request_job_unittest.cc
+++ b/net/url_request/url_request_job_unittest.cc
@@ -93,44 +93,91 @@ void MakeMockReferrerPolicyTransaction(const char* original_url,
}
transaction->cert_status = 0;
transaction->ssl_connection_status = 0;
- transaction->return_code = OK;
+ transaction->start_return_code = OK;
}
const MockTransaction kNoFilter_Transaction = {
- "http://www.google.com/gzyp", "GET", base::Time(), "", LOAD_NORMAL,
+ "http://www.google.com/gzyp",
+ "GET",
+ base::Time(),
+ "",
+ LOAD_NORMAL,
"HTTP/1.1 200 OK",
"Cache-Control: max-age=10000\n"
"Content-Length: 30\n", // Intentionally wrong.
base::Time(),
- "hello", TEST_MODE_NORMAL, nullptr, nullptr, 0, 0, OK,
+ "hello",
+ TEST_MODE_NORMAL,
+ nullptr,
+ nullptr,
+ 0,
+ 0,
+ OK,
+ OK,
};
const MockTransaction kGZip_Transaction = {
- "http://www.google.com/gzyp", "GET", base::Time(), "", LOAD_NORMAL,
+ "http://www.google.com/gzyp",
+ "GET",
+ base::Time(),
+ "",
+ LOAD_NORMAL,
"HTTP/1.1 200 OK",
"Cache-Control: max-age=10000\n"
"Content-Encoding: gzip\n"
"Content-Length: 30\n", // Intentionally wrong.
base::Time(),
- "", TEST_MODE_NORMAL, &GZipServer, nullptr, nullptr, 0, 0, OK,
+ "",
+ TEST_MODE_NORMAL,
+ &GZipServer,
+ nullptr,
+ nullptr,
+ 0,
+ 0,
+ OK,
+ OK,
};
const MockTransaction kGzip_Slow_Transaction = {
- "http://www.google.com/gzyp", "GET", base::Time(), "", LOAD_NORMAL,
+ "http://www.google.com/gzyp",
+ "GET",
+ base::Time(),
+ "",
+ LOAD_NORMAL,
"HTTP/1.1 200 OK",
"Cache-Control: max-age=10000\n"
"Content-Encoding: gzip\n",
- base::Time(), "", TEST_MODE_SLOW_READ, &GZipHelloServer, nullptr, nullptr,
- 0, 0, OK,
+ base::Time(),
+ "",
+ TEST_MODE_SLOW_READ,
+ &GZipHelloServer,
+ nullptr,
+ nullptr,
+ 0,
+ 0,
+ OK,
+ OK,
};
const MockTransaction kRedirect_Transaction = {
- "http://www.google.com/redirect", "GET", base::Time(), "", LOAD_NORMAL,
+ "http://www.google.com/redirect",
+ "GET",
+ base::Time(),
+ "",
+ LOAD_NORMAL,
"HTTP/1.1 302 Found",
"Cache-Control: max-age=10000\n"
"Location: http://www.google.com/destination\n"
"Content-Length: 5\n",
- base::Time(), "hello", TEST_MODE_NORMAL, nullptr, nullptr, nullptr, 0, 0,
+ base::Time(),
+ "hello",
+ TEST_MODE_NORMAL,
+ nullptr,
+ nullptr,
+ nullptr,
+ 0,
+ 0,
+ OK,
OK,
};
@@ -151,24 +198,49 @@ const MockTransaction kEmptyBodyGzip_Transaction = {
0,
0,
OK,
+ OK,
};
const MockTransaction kInvalidContentGZip_Transaction = {
- "http://www.google.com/gzyp", "GET", base::Time(), "", LOAD_NORMAL,
+ "http://www.google.com/gzyp",
+ "GET",
+ base::Time(),
+ "",
+ LOAD_NORMAL,
"HTTP/1.1 200 OK",
"Content-Encoding: gzip\n"
"Content-Length: 21\n",
- base::Time(), "not a valid gzip body", TEST_MODE_NORMAL, nullptr, nullptr,
- nullptr, 0, 0, OK,
+ base::Time(),
+ "not a valid gzip body",
+ TEST_MODE_NORMAL,
+ nullptr,
+ nullptr,
+ nullptr,
+ 0,
+ 0,
+ OK,
+ OK,
};
const MockTransaction kBrotli_Slow_Transaction = {
- "http://www.google.com/brotli", "GET", base::Time(), "", LOAD_NORMAL,
+ "http://www.google.com/brotli",
+ "GET",
+ base::Time(),
+ "",
+ LOAD_NORMAL,
"HTTP/1.1 200 OK",
"Cache-Control: max-age=10000\n"
"Content-Encoding: br\n",
- base::Time(), "", TEST_MODE_SLOW_READ, &BrotliHelloServer, nullptr, nullptr,
- 0, 0, OK,
+ base::Time(),
+ "",
+ TEST_MODE_SLOW_READ,
+ &BrotliHelloServer,
+ nullptr,
+ nullptr,
+ 0,
+ 0,
+ OK,
+ OK,
};
} // namespace
« no previous file with comments | « net/http/http_transaction_test_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698