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

Unified Diff: chrome/browser/captive_portal/captive_portal_browsertest.cc

Issue 541743002: Move url_request_mock_http_job to net/test/url_request/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 6 years, 3 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: 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));
}
}

Powered by Google App Engine
This is Rietveld 408576698