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

Unified Diff: content/browser/loader/resource_dispatcher_host_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: Addressed comments 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: content/browser/loader/resource_dispatcher_host_browsertest.cc
diff --git a/content/browser/loader/resource_dispatcher_host_browsertest.cc b/content/browser/loader/resource_dispatcher_host_browsertest.cc
index 0858bd67e035518f58d7d5ba4157559a1eb0320c..1e77b3bd3c49c475fab336d438d848a0ddffed97 100644
--- a/content/browser/loader/resource_dispatcher_host_browsertest.cc
+++ b/content/browser/loader/resource_dispatcher_host_browsertest.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/memory/ref_counted.h"
#include "base/strings/string_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
@@ -19,11 +20,11 @@
#include "content/shell/browser/shell_content_browser_client.h"
#include "content/shell/browser/shell_network_delegate.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/test/embedded_test_server/embedded_test_server.h"
#include "net/test/embedded_test_server/http_request.h"
#include "net/test/embedded_test_server/http_response.h"
+#include "net/test/url_request/url_request_mock_http_job.h"
using base::ASCIIToUTF16;
@@ -39,7 +40,9 @@ class ResourceDispatcherHostBrowserTest : public ContentBrowserTest,
base::FilePath path = GetTestFilePath("", "");
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
- base::Bind(&URLRequestMockHTTPJob::AddUrlHandler, path));
+ base::Bind(&net::URLRequestMockHTTPJob::AddUrlHandler, path,
+ make_scoped_refptr(
+ content::BrowserThread::GetBlockingPool())));
BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE,
base::Bind(&URLRequestFailedJob::AddUrlHandler));
@@ -53,7 +56,7 @@ class ResourceDispatcherHostBrowserTest : public ContentBrowserTest,
}
GURL GetMockURL(const std::string& file) {
- return URLRequestMockHTTPJob::GetMockUrl(
+ return net::URLRequestMockHTTPJob::GetMockUrl(
base::FilePath().AppendASCII(file));
}

Powered by Google App Engine
This is Rietveld 408576698