Chromium Code Reviews| Index: chrome/browser/captive_portal/captive_portal_browsertest.cc |
| diff --git a/chrome/browser/captive_portal/captive_portal_browsertest.cc b/chrome/browser/captive_portal/captive_portal_browsertest.cc |
| index 11deb82ed58b8694f2578ebb511726925b2a52c3..265673e8b4fafeede850d9276f388684fda946b8 100644 |
| --- a/chrome/browser/captive_portal/captive_portal_browsertest.cc |
| +++ b/chrome/browser/captive_portal/captive_portal_browsertest.cc |
| @@ -42,9 +42,9 @@ |
| #include "content/public/browser/web_contents.h" |
| #include "content/public/common/url_constants.h" |
| #include "content/test/net/url_request_failed_job.h" |
| -#include "content/test/net/url_request_mock_http_job.h" |
| #include "net/base/net_errors.h" |
| #include "net/http/transport_security_state.h" |
| +#include "net/test/url_request/url_request_mock_http_job.h" |
| #include "net/url_request/url_request.h" |
| #include "net/url_request/url_request_context.h" |
| #include "net/url_request/url_request_context_getter.h" |
| @@ -56,7 +56,7 @@ |
| using captive_portal::CaptivePortalResult; |
| using content::BrowserThread; |
| using content::URLRequestFailedJob; |
| -using content::URLRequestMockHTTPJob; |
| +using net::URLRequestMockHTTPJob; |
|
Lei Zhang
2014/09/09 21:37:59
nit: sort
xunjieli
2014/09/09 22:08:58
Done.
|
| using content::WebContents; |
| namespace { |
| @@ -427,7 +427,10 @@ net::URLRequestJob* URLRequestMockCaptivePortalJobFactory::Factory( |
| return new URLRequestMockHTTPJob( |
| request, |
| network_delegate, |
| - root_http.Append(FILE_PATH_LITERAL("title2.html"))); |
| + root_http.Append(FILE_PATH_LITERAL("title2.html")), |
| + content::BrowserThread::GetBlockingPool() |
|
Lei Zhang
2014/09/09 21:37:59
nit: Write this as BrowserThread::GetBlockingPool(
xunjieli
2014/09/09 22:08:58
Done.Thanks!
|
| + ->GetTaskRunnerWithShutdownBehavior( |
| + base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| } else if (request->url() == GURL(kMockHttpsQuickTimeoutUrl)) { |
| if (behind_captive_portal_) |
| return new URLRequestFailedJob( |
| @@ -437,7 +440,10 @@ net::URLRequestJob* URLRequestMockCaptivePortalJobFactory::Factory( |
| return new URLRequestMockHTTPJob( |
| request, |
| network_delegate, |
| - root_http.Append(FILE_PATH_LITERAL("title2.html"))); |
| + root_http.Append(FILE_PATH_LITERAL("title2.html")), |
| + content::BrowserThread::GetBlockingPool() |
| + ->GetTaskRunnerWithShutdownBehavior( |
| + base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| } else { |
| // The URL should be the captive portal test URL. |
| EXPECT_TRUE(GURL(kMockCaptivePortalTestUrl) == request->url() || |
| @@ -450,19 +456,28 @@ net::URLRequestJob* URLRequestMockCaptivePortalJobFactory::Factory( |
| return new URLRequestMockHTTPJob( |
| request, |
| network_delegate, |
| - root_http.Append(FILE_PATH_LITERAL("captive_portal/page511.html"))); |
| + root_http.Append(FILE_PATH_LITERAL("captive_portal/page511.html")), |
| + content::BrowserThread::GetBlockingPool() |
| + ->GetTaskRunnerWithShutdownBehavior( |
| + base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| } |
| return new URLRequestMockHTTPJob( |
| request, |
| network_delegate, |
| - root_http.Append(FILE_PATH_LITERAL("captive_portal/login.html"))); |
| + root_http.Append(FILE_PATH_LITERAL("captive_portal/login.html")), |
| + content::BrowserThread::GetBlockingPool() |
| + ->GetTaskRunnerWithShutdownBehavior( |
| + base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| } |
| // After logging in to the portal, the test URLs return a 204 response. |
| return new URLRequestMockHTTPJob( |
| request, |
| network_delegate, |
| - root_http.Append(FILE_PATH_LITERAL("captive_portal/page204.html"))); |
| + root_http.Append(FILE_PATH_LITERAL("captive_portal/page204.html")), |
| + content::BrowserThread::GetBlockingPool() |
| + ->GetTaskRunnerWithShutdownBehavior( |
| + base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
| } |
| } |