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 |