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..473c229ceddf909dfcb468b53bd177ab50552627 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,8 +56,8 @@ |
using captive_portal::CaptivePortalResult; |
using content::BrowserThread; |
using content::URLRequestFailedJob; |
-using content::URLRequestMockHTTPJob; |
using content::WebContents; |
+using net::URLRequestMockHTTPJob; |
namespace { |
@@ -427,7 +427,9 @@ 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")), |
+ BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( |
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
} else if (request->url() == GURL(kMockHttpsQuickTimeoutUrl)) { |
if (behind_captive_portal_) |
return new URLRequestFailedJob( |
@@ -437,7 +439,9 @@ 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")), |
+ 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 +454,25 @@ 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")), |
+ 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")), |
+ 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")), |
+ BrowserThread::GetBlockingPool()->GetTaskRunnerWithShutdownBehavior( |
+ base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)); |
} |
} |