| 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 02cba5ba29066c74b3b5500b6e6472b8d9507b37..9eb691a5f48d4ae15f3381564f460db00f99c39e 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
|
|
|