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

Unified Diff: chrome/browser/policy/policy_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: Fixed a few compile errors 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/policy/policy_browsertest.cc
diff --git a/chrome/browser/policy/policy_browsertest.cc b/chrome/browser/policy/policy_browsertest.cc
index d5d50099cefd7cedf5cb20ab15c034b7f586a3b9..a2506f3baf56d4db3e9a556eeef198bb4e7823f3 100644
--- a/chrome/browser/policy/policy_browsertest.cc
+++ b/chrome/browser/policy/policy_browsertest.cc
@@ -123,7 +123,6 @@
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "content/test/net/url_request_failed_job.h"
-#include "content/test/net/url_request_mock_http_job.h"
#include "extensions/browser/extension_host.h"
#include "extensions/browser/extension_system.h"
#include "extensions/browser/process_manager.h"
@@ -135,6 +134,7 @@
#include "net/base/net_util.h"
#include "net/base/url_util.h"
#include "net/http/http_stream_factory.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_filter.h"
#include "policy/policy_constants.h"
@@ -169,7 +169,7 @@
#endif
using content::BrowserThread;
-using content::URLRequestMockHTTPJob;
+using net::URLRequestMockHTTPJob;
using testing::Mock;
using testing::Return;
using testing::_;
@@ -225,7 +225,9 @@ void RedirectHostsToTestData(const char* const urls[], size_t size) {
const GURL url(urls[i]);
EXPECT_TRUE(url.is_valid());
filter->AddUrlInterceptor(
- url, URLRequestMockHTTPJob::CreateInterceptor(base_path));
+ url, URLRequestMockHTTPJob::CreateInterceptor(
+ base_path,
+ content::BrowserThread::GetBlockingPool()));
}
}
@@ -619,7 +621,11 @@ class PolicyTest : public InProcessBrowserTest {
PathService::Get(content::DIR_TEST_DATA, &root_http);
BrowserThread::PostTaskAndReply(
BrowserThread::IO, FROM_HERE,
- base::Bind(URLRequestMockHTTPJob::AddUrlHandler, root_http),
+ base::Bind(
+ URLRequestMockHTTPJob::AddUrlHandler,
+ root_http,
+ scoped_refptr<base::SequencedWorkerPool> (
+ BrowserThread::GetBlockingPool())),
base::MessageLoop::current()->QuitWhenIdleClosure());
content::RunMessageLoop();
}

Powered by Google App Engine
This is Rietveld 408576698