Index: chrome/browser/extensions/user_script_listener_unittest.cc |
diff --git a/chrome/browser/extensions/user_script_listener_unittest.cc b/chrome/browser/extensions/user_script_listener_unittest.cc |
index 38b628b3237f3a8b0012d2424e1429ecf3ad3c11..d390c7ef3cd5f5351d8976e0a2b0476c54f040fd 100644 |
--- a/chrome/browser/extensions/user_script_listener_unittest.cc |
+++ b/chrome/browser/extensions/user_script_listener_unittest.cc |
@@ -121,9 +121,10 @@ class UserScriptListenerTest |
protected: |
TestURLRequest* StartTestRequest(net::URLRequest::Delegate* delegate, |
- const std::string& url_string) { |
+ const std::string& url_string, |
+ TestURLRequestContext* context) { |
GURL url(url_string); |
- TestURLRequest* request = new TestURLRequest(url, delegate); |
+ TestURLRequest* request = new TestURLRequest(url, delegate, context); |
ResourceThrottle* throttle = |
listener_->CreateResourceThrottle(url, ResourceType::MAIN_FRAME); |
@@ -169,7 +170,9 @@ TEST_F(UserScriptListenerTest, DelayAndUpdate) { |
MessageLoop::current()->RunAllPending(); |
TestDelegate delegate; |
- scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kMatchingUrl)); |
+ TestURLRequestContext context; |
+ scoped_ptr<TestURLRequest> request( |
+ StartTestRequest(&delegate, kMatchingUrl, &context)); |
ASSERT_FALSE(request->is_pending()); |
content::NotificationService::current()->Notify( |
@@ -185,7 +188,9 @@ TEST_F(UserScriptListenerTest, DelayAndUnload) { |
MessageLoop::current()->RunAllPending(); |
TestDelegate delegate; |
- scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kMatchingUrl)); |
+ TestURLRequestContext context; |
+ scoped_ptr<TestURLRequest> request( |
+ StartTestRequest(&delegate, kMatchingUrl, &context)); |
ASSERT_FALSE(request->is_pending()); |
UnloadTestExtension(); |
@@ -205,7 +210,9 @@ TEST_F(UserScriptListenerTest, DelayAndUnload) { |
TEST_F(UserScriptListenerTest, NoDelayNoExtension) { |
TestDelegate delegate; |
- scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kMatchingUrl)); |
+ TestURLRequestContext context; |
+ scoped_ptr<TestURLRequest> request( |
+ StartTestRequest(&delegate, kMatchingUrl, &context)); |
// The request should be started immediately. |
ASSERT_TRUE(request->is_pending()); |
@@ -219,8 +226,10 @@ TEST_F(UserScriptListenerTest, NoDelayNotMatching) { |
MessageLoop::current()->RunAllPending(); |
TestDelegate delegate; |
+ TestURLRequestContext context; |
scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, |
- kNotMatchingUrl)); |
+ kNotMatchingUrl, |
+ &context)); |
// The request should be started immediately. |
ASSERT_TRUE(request->is_pending()); |
@@ -247,7 +256,9 @@ TEST_F(UserScriptListenerTest, MultiProfile) { |
content::Details<Extension>(extension.get())); |
TestDelegate delegate; |
- scoped_ptr<TestURLRequest> request(StartTestRequest(&delegate, kMatchingUrl)); |
+ TestURLRequestContext context; |
+ scoped_ptr<TestURLRequest> request( |
+ StartTestRequest(&delegate, kMatchingUrl, &context)); |
ASSERT_FALSE(request->is_pending()); |
// When the first profile's user scripts are ready, the request should still |