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

Unified Diff: net/url_request/url_request_job_factory_unittest.cc

Issue 10559036: Added URLRequestContext to constructor for URLRequest. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed unused variable Created 8 years, 6 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
Index: net/url_request/url_request_job_factory_unittest.cc
diff --git a/net/url_request/url_request_job_factory_unittest.cc b/net/url_request/url_request_job_factory_unittest.cc
index d385e7ff2870d5e0103efe3ac69a680de7a09075..bbb3703021a77de311e9bef8fb33ab1f3426fa3e 100644
--- a/net/url_request/url_request_job_factory_unittest.cc
+++ b/net/url_request/url_request_job_factory_unittest.cc
@@ -88,8 +88,7 @@ class DummyInterceptor : public URLRequestJobFactory::Interceptor {
TEST(URLRequestJobFactoryTest, NoProtocolHandler) {
TestDelegate delegate;
TestURLRequestContext request_context;
- TestURLRequest request(GURL("foo://bar"), &delegate);
- request.set_context(&request_context);
+ TestURLRequest request(GURL("foo://bar"), &delegate, &request_context);
request.Start();
MessageLoop::current()->Run();
@@ -103,8 +102,7 @@ TEST(URLRequestJobFactoryTest, BasicProtocolHandler) {
TestURLRequestContext request_context;
request_context.set_job_factory(&job_factory);
job_factory.SetProtocolHandler("foo", new DummyProtocolHandler);
- TestURLRequest request(GURL("foo://bar"), &delegate);
- request.set_context(&request_context);
+ TestURLRequest request(GURL("foo://bar"), &delegate, &request_context);
request.Start();
MessageLoop::current()->Run();
@@ -126,8 +124,7 @@ TEST(URLRequestJobFactoryTest, BasicInterceptor) {
TestURLRequestContext request_context;
request_context.set_job_factory(&job_factory);
job_factory.AddInterceptor(new DummyInterceptor);
- TestURLRequest request(GURL("http://bar"), &delegate);
- request.set_context(&request_context);
+ TestURLRequest request(GURL("http://bar"), &delegate, &request_context);
request.Start();
MessageLoop::current()->Run();
@@ -141,8 +138,7 @@ TEST(URLRequestJobFactoryTest, InterceptorNeedsValidSchemeStill) {
TestURLRequestContext request_context;
request_context.set_job_factory(&job_factory);
job_factory.AddInterceptor(new DummyInterceptor);
- TestURLRequest request(GURL("foo://bar"), &delegate);
- request.set_context(&request_context);
+ TestURLRequest request(GURL("foo://bar"), &delegate, &request_context);
request.Start();
MessageLoop::current()->Run();
@@ -157,8 +153,7 @@ TEST(URLRequestJobFactoryTest, InterceptorOverridesProtocolHandler) {
request_context.set_job_factory(&job_factory);
job_factory.SetProtocolHandler("foo", new DummyProtocolHandler);
job_factory.AddInterceptor(new DummyInterceptor);
- TestURLRequest request(GURL("foo://bar"), &delegate);
- request.set_context(&request_context);
+ TestURLRequest request(GURL("foo://bar"), &delegate, &request_context);
request.Start();
MessageLoop::current()->Run();
@@ -173,8 +168,7 @@ TEST(URLRequestJobFactoryTest, InterceptorDoesntInterceptUnknownProtocols) {
request_context.set_job_factory(&job_factory);
DummyInterceptor* interceptor = new DummyInterceptor;
job_factory.AddInterceptor(interceptor);
- TestURLRequest request(GURL("foo://bar"), &delegate);
- request.set_context(&request_context);
+ TestURLRequest request(GURL("foo://bar"), &delegate, &request_context);
request.Start();
MessageLoop::current()->Run();
@@ -189,8 +183,7 @@ TEST(URLRequestJobFactoryTest, InterceptorInterceptsHandledUnknownProtocols) {
DummyInterceptor* interceptor = new DummyInterceptor;
interceptor->handle_all_protocols_ = true;
job_factory.AddInterceptor(interceptor);
- TestURLRequest request(GURL("foo://bar"), &delegate);
- request.set_context(&request_context);
+ TestURLRequest request(GURL("foo://bar"), &delegate, &request_context);
request.Start();
MessageLoop::current()->Run();

Powered by Google App Engine
This is Rietveld 408576698