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

Unified Diff: content/browser/download/download_browsertest.cc

Issue 1391423002: net: Remove FilePath version of URLRequestMockHTTPJob::GetMockUrl(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix download_browsertest.cc typos Created 5 years, 2 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/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index fea996e5d65af6ebea15da60c4f2f65658d02cd6..735f940a97836871970355789e77f1a4fb0135cf 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -798,8 +798,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, MultiDownload) {
DownloadItem* download1 = downloads[0]; // The only download.
// Start the second download and wait until it's done.
- base::FilePath file(FILE_PATH_LITERAL("download-test.lib"));
- GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file));
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
// Download the file and wait.
NavigateToURLAndWaitForDownload(shell(), url, DownloadItem::COMPLETE);
@@ -842,8 +841,6 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, MultiDownload) {
// Content served with a MIME type of application/octet-stream should be
// downloaded even when a plugin can be found that handles the file type.
IN_PROC_BROWSER_TEST_F(DownloadContentTest, DownloadOctetStream) {
- const base::FilePath::CharType kTestFilePath[] =
- FILE_PATH_LITERAL("octet-stream.abc");
const char kTestPluginName[] = "TestPlugin";
const char kTestMimeType[] = "application/x-test-mime-type";
const char kTestFileType[] = "abc";
@@ -857,7 +854,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, DownloadOctetStream) {
// The following is served with a Content-Type of application/octet-stream.
GURL url(
- net::URLRequestMockHTTPJob::GetMockUrl(base::FilePath(kTestFilePath)));
+ net::URLRequestMockHTTPJob::GetMockUrl("octet-stream.abc"));
NavigateToURLAndWaitForDownload(shell(), url, DownloadItem::COMPLETE);
}
#endif
@@ -873,8 +870,8 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, CancelAtFinalRename) {
scoped_ptr<DownloadFileFactory>(file_factory).Pass());
// Create a download
- base::FilePath file(FILE_PATH_LITERAL("download-test.lib"));
- NavigateToURL(shell(), net::URLRequestMockHTTPJob::GetMockUrl(file));
+ NavigateToURL(shell(),
+ net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
// Wait until the first (intermediate file) rename and execute the callback.
file_factory->WaitForSomeCallback();
@@ -922,8 +919,8 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, CancelAtRelease) {
scoped_ptr<DownloadFileFactory>(file_factory).Pass());
// Create a download
- base::FilePath file(FILE_PATH_LITERAL("download-test.lib"));
- NavigateToURL(shell(), net::URLRequestMockHTTPJob::GetMockUrl(file));
+ NavigateToURL(shell(),
+ net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
// Wait until the first (intermediate file) rename and execute the callback.
file_factory->WaitForSomeCallback();
@@ -1032,8 +1029,8 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ShutdownAtRelease) {
scoped_ptr<DownloadFileFactory>(file_factory).Pass());
// Create a download
- base::FilePath file(FILE_PATH_LITERAL("download-test.lib"));
- NavigateToURL(shell(), net::URLRequestMockHTTPJob::GetMockUrl(file));
+ NavigateToURL(shell(),
+ net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
// Wait until the first (intermediate file) rename and execute the callback.
file_factory->WaitForSomeCallback();
@@ -1339,8 +1336,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeWithDeletedFile) {
IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeWithFileInitError) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableDownloadResumption);
- base::FilePath file(FILE_PATH_LITERAL("download-test.lib"));
- GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file));
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
// Setup the error injector.
scoped_refptr<TestFileErrorInjector> injector(
@@ -1390,8 +1386,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest,
ResumeWithFileIntermediateRenameError) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableDownloadResumption);
- base::FilePath file(FILE_PATH_LITERAL("download-test.lib"));
- GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file));
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
// Setup the error injector.
scoped_refptr<TestFileErrorInjector> injector(
@@ -1442,8 +1437,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest,
IN_PROC_BROWSER_TEST_F(DownloadContentTest, ResumeWithFileFinalRenameError) {
base::CommandLine::ForCurrentProcess()->AppendSwitch(
switches::kEnableDownloadResumption);
- base::FilePath file(FILE_PATH_LITERAL("download-test.lib"));
- GURL url(net::URLRequestMockHTTPJob::GetMockUrl(file));
+ GURL url(net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
// Setup the error injector.
scoped_refptr<TestFileErrorInjector> injector(
@@ -1557,8 +1551,7 @@ IN_PROC_BROWSER_TEST_F(DownloadContentTest, RemoveDownload) {
// removed.
{
// Start the second download and wait until it's done.
- base::FilePath file2(FILE_PATH_LITERAL("download-test.lib"));
- GURL url2(net::URLRequestMockHTTPJob::GetMockUrl(file2));
+ GURL url2(net::URLRequestMockHTTPJob::GetMockUrl("download-test.lib"));
scoped_ptr<DownloadTestObserver> completion_observer(
CreateWaiter(shell(), 1));
DownloadItem* download(StartDownloadAndReturnItem(url2));

Powered by Google App Engine
This is Rietveld 408576698