| 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 37a457f5090e724bcedee005eaefeb11d934a7ec..e9d79a400f989820f11a8738b3542a04806a824a 100644
|
| --- a/net/url_request/url_request_job_unittest.cc
|
| +++ b/net/url_request/url_request_job_unittest.cc
|
| @@ -60,6 +60,15 @@ void BrotliHelloServer(const HttpRequestInfo* request,
|
| response_data->assign(kBrotliHelloData, sizeof(kBrotliHelloData) - 1);
|
| }
|
|
|
| +const MockTransaction kNoFilter_Transaction = {
|
| + "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,
|
| +};
|
| +
|
| const MockTransaction kGZip_Transaction = {
|
| "http://www.google.com/gzyp",
|
| "GET",
|
| @@ -146,6 +155,26 @@ const MockTransaction kBrotli_Slow_Transaction = {
|
|
|
| } // namespace
|
|
|
| +TEST(URLRequestJob, TransactionNoFilter) {
|
| + MockNetworkLayer network_layer;
|
| + TestURLRequestContext context;
|
| + context.set_http_transaction_factory(&network_layer);
|
| +
|
| + TestDelegate d;
|
| + scoped_ptr<URLRequest> req(context.CreateRequest(
|
| + GURL(kNoFilter_Transaction.url), DEFAULT_PRIORITY, &d));
|
| + AddMockTransaction(&kNoFilter_Transaction);
|
| +
|
| + req->set_method("GET");
|
| + req->Start();
|
| +
|
| + base::MessageLoop::current()->Run();
|
| +
|
| + EXPECT_TRUE(network_layer.done_reading_called());
|
| +
|
| + RemoveMockTransaction(&kNoFilter_Transaction);
|
| +}
|
| +
|
| TEST(URLRequestJob, TransactionNotifiedWhenDone) {
|
| MockNetworkLayer network_layer;
|
| TestURLRequestContext context;
|
|
|