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 017b98b061ef57d9cbea312143ecf412105cee73..0f7fd306f676653634857afa70709601ba598c6e 100644 |
--- a/net/url_request/url_request_job_unittest.cc |
+++ b/net/url_request/url_request_job_unittest.cc |
@@ -39,15 +39,15 @@ const MockTransaction kGZip_Transaction = { |
} // namespace |
TEST(URLRequestJob, TransactionNotifiedWhenDone) { |
- TestDelegate d; |
- TestURLRequest req(GURL(kGZip_Transaction.url), &d); |
MockNetworkLayer network_layer; |
+ TestURLRequestContext context; |
+ context.set_http_transaction_factory(&network_layer); |
+ TestDelegate d; |
+ TestURLRequest req(GURL(kGZip_Transaction.url), &d); |
AddMockTransaction(&kGZip_Transaction); |
- scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext()); |
- context->set_http_transaction_factory(&network_layer); |
- req.set_context(context); |
+ req.set_context(&context); |
req.set_method("GET"); |
req.Start(); |
@@ -59,17 +59,17 @@ TEST(URLRequestJob, TransactionNotifiedWhenDone) { |
} |
TEST(URLRequestJob, SyncTransactionNotifiedWhenDone) { |
- TestDelegate d; |
- TestURLRequest req(GURL(kGZip_Transaction.url), &d); |
MockNetworkLayer network_layer; |
+ TestURLRequestContext context; |
+ context.set_http_transaction_factory(&network_layer); |
+ TestDelegate d; |
+ TestURLRequest req(GURL(kGZip_Transaction.url), &d); |
MockTransaction transaction(kGZip_Transaction); |
transaction.test_mode = TEST_MODE_SYNC_ALL; |
AddMockTransaction(&transaction); |
- scoped_refptr<TestURLRequestContext> context(new TestURLRequestContext()); |
- context->set_http_transaction_factory(&network_layer); |
- req.set_context(context); |
+ req.set_context(&context); |
req.set_method("GET"); |
req.Start(); |