Index: content/browser/download/download_browsertest.cc |
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc |
index a768c44bbde1a60e9377657d0debb9ebb30dbc7f..6247fbf878e59dcff26dd8e2d209151c528d3018 100644 |
--- a/content/browser/download/download_browsertest.cc |
+++ b/content/browser/download/download_browsertest.cc |
@@ -34,12 +34,12 @@ |
#include "content/shell/browser/shell_browser_context.h" |
#include "content/shell/browser/shell_download_manager_delegate.h" |
#include "content/shell/browser/shell_network_delegate.h" |
-#include "content/test/net/url_request_mock_http_job.h" |
#include "content/test/net/url_request_slow_download_job.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/spawned_test_server/spawned_test_server.h" |
+#include "net/test/url_request/url_request_mock_http_job.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
#include "url/gurl.h" |
@@ -586,7 +586,10 @@ class DownloadContentTest : public ContentBrowserTest { |
base::FilePath mock_base(GetTestFilePath("download", "")); |
BrowserThread::PostTask( |
BrowserThread::IO, FROM_HERE, |
- base::Bind(&URLRequestMockHTTPJob::AddUrlHandler, mock_base)); |
+ base::Bind( |
+ &net::URLRequestMockHTTPJob::AddUrlHandler, |
+ mock_base, |
+ content::BrowserThread::GetBlockingPool())); |
} |
TestShellDownloadManagerDelegate* GetDownloadManagerDelegate() { |
@@ -798,7 +801,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, MultiDownload) { |
// Start the second download and wait until it's done. |
base::FilePath file(FILE_PATH_LITERAL("download-test.lib")); |
- GURL url(URLRequestMockHTTPJob::GetMockUrl(file)); |
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file)); |
// Download the file and wait. |
NavigateToURLAndWaitForDownload(shell(), url, DownloadItem::COMPLETE); |
@@ -853,7 +856,8 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, DownloadOctetStream) { |
PluginServiceImpl::GetInstance()->RegisterInternalPlugin(plugin_info, false); |
// The following is served with a Content-Type of application/octet-stream. |
- GURL url(URLRequestMockHTTPJob::GetMockUrl(base::FilePath(kTestFilePath))); |
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl( |
+ base::FilePath(kTestFilePath))); |
NavigateToURLAndWaitForDownload(shell(), url, DownloadItem::COMPLETE); |
} |
#endif |
@@ -870,7 +874,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, CancelAtFinalRename) { |
// Create a download |
base::FilePath file(FILE_PATH_LITERAL("download-test.lib")); |
- NavigateToURL(shell(), URLRequestMockHTTPJob::GetMockUrl(file)); |
+ NavigateToURL(shell(), net::URLRequestMockHTTPJob::GetMockUrl(file)); |
// Wait until the first (intermediate file) rename and execute the callback. |
file_factory->WaitForSomeCallback(); |
@@ -919,7 +923,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, CancelAtRelease) { |
// Create a download |
base::FilePath file(FILE_PATH_LITERAL("download-test.lib")); |
- NavigateToURL(shell(), URLRequestMockHTTPJob::GetMockUrl(file)); |
+ NavigateToURL(shell(), net::URLRequestMockHTTPJob::GetMockUrl(file)); |
// Wait until the first (intermediate file) rename and execute the callback. |
file_factory->WaitForSomeCallback(); |
@@ -1029,7 +1033,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ShutdownAtRelease) { |
// Create a download |
base::FilePath file(FILE_PATH_LITERAL("download-test.lib")); |
- NavigateToURL(shell(), URLRequestMockHTTPJob::GetMockUrl(file)); |
+ NavigateToURL(shell(), net::URLRequestMockHTTPJob::GetMockUrl(file)); |
// Wait until the first (intermediate file) rename and execute the callback. |
file_factory->WaitForSomeCallback(); |
@@ -1336,7 +1340,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeWithFileInitError) { |
base::CommandLine::ForCurrentProcess()->AppendSwitch( |
switches::kEnableDownloadResumption); |
base::FilePath file(FILE_PATH_LITERAL("download-test.lib")); |
- GURL url(URLRequestMockHTTPJob::GetMockUrl(file)); |
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file)); |
// Setup the error injector. |
scoped_refptr<TestFileErrorInjector> injector( |
@@ -1387,7 +1391,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, |
base::CommandLine::ForCurrentProcess()->AppendSwitch( |
switches::kEnableDownloadResumption); |
base::FilePath file(FILE_PATH_LITERAL("download-test.lib")); |
- GURL url(URLRequestMockHTTPJob::GetMockUrl(file)); |
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file)); |
// Setup the error injector. |
scoped_refptr<TestFileErrorInjector> injector( |
@@ -1439,7 +1443,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeWithFileFinalRenameError) { |
base::CommandLine::ForCurrentProcess()->AppendSwitch( |
switches::kEnableDownloadResumption); |
base::FilePath file(FILE_PATH_LITERAL("download-test.lib")); |
- GURL url(URLRequestMockHTTPJob::GetMockUrl(file)); |
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file)); |
// Setup the error injector. |
scoped_refptr<TestFileErrorInjector> injector( |
@@ -1554,7 +1558,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, RemoveDownload) { |
{ |
// Start the second download and wait until it's done. |
base::FilePath file2(FILE_PATH_LITERAL("download-test.lib")); |
- GURL url2(URLRequestMockHTTPJob::GetMockUrl(file2)); |
+ GURL url2(net::URLRequestMockHTTPJob::GetMockUrl(file2)); |
scoped_ptr<DownloadTestObserver> completion_observer( |
CreateWaiter(shell(), 1)); |
DownloadItem* download(StartDownloadAndReturnItem(url2)); |