diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 20:32:19 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-14 20:32:19 +0000 |
commit | 158a0892d261b8c717f2bc92bec4649898e4da96 (patch) | |
tree | a9ffd69181f6798160a59384d2e6088771364c29 /chrome/browser/download | |
parent | 866ba3fc1097334050b59b919e12e11314f2965d (diff) | |
download | chromium_src-158a0892d261b8c717f2bc92bec4649898e4da96.zip chromium_src-158a0892d261b8c717f2bc92bec4649898e4da96.tar.gz chromium_src-158a0892d261b8c717f2bc92bec4649898e4da96.tar.bz2 |
Use FilePath in URLRequestMocks.
BUG=24672
TEST=compiles
Review URL: http://codereview.chromium.org/271066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29013 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/download')
-rw-r--r-- | chrome/browser/download/download_uitest.cc | 11 | ||||
-rw-r--r-- | chrome/browser/download/save_page_browsertest.cc | 6 | ||||
-rw-r--r-- | chrome/browser/download/save_page_uitest.cc | 4 |
3 files changed, 10 insertions, 11 deletions
diff --git a/chrome/browser/download/download_uitest.cc b/chrome/browser/download/download_uitest.cc index 107e79c..f35fd5c 100644 --- a/chrome/browser/download/download_uitest.cc +++ b/chrome/browser/download/download_uitest.cc @@ -181,7 +181,7 @@ TEST_F(DownloadTest, DownloadMimeType) { EXPECT_EQ(1, GetTabCount()); - NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file.ToWStringHack())); + NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file)); // No new tabs created, downloads appear in the current tab's download shelf. WaitUntilTabCount(1); @@ -206,7 +206,7 @@ TEST_F(DownloadTest, NoDownload) { EXPECT_EQ(1, GetTabCount()); - NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file.ToWStringHack())); + NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file)); WaitUntilTabCount(1); // Wait to see if the file will be downloaded. @@ -230,7 +230,7 @@ TEST_F(DownloadTest, ContentDisposition) { EXPECT_EQ(1, GetTabCount()); - NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file.ToWStringHack())); + NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file)); WaitUntilTabCount(1); // Wait until the file is downloaded. @@ -253,7 +253,7 @@ TEST_F(DownloadTest, PerWindowShelf) { EXPECT_EQ(1, GetTabCount()); - NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file.ToWStringHack())); + NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file)); WaitUntilTabCount(1); // Wait until the file is downloaded. @@ -336,8 +336,7 @@ TEST_F(DownloadTest, FLAKY_IncognitoDownload) { // Download something. FilePath file(FILE_PATH_LITERAL("download-test1.lib")); //PlatformThread::Sleep(1000); - ASSERT_TRUE(tab->NavigateToURL( - URLRequestMockHTTPJob::GetMockUrl(file.ToWStringHack()))); + ASSERT_TRUE(tab->NavigateToURL(URLRequestMockHTTPJob::GetMockUrl(file))); PlatformThread::Sleep(action_timeout_ms()); // Verify that the download shelf is showing for the Incognito window. diff --git a/chrome/browser/download/save_page_browsertest.cc b/chrome/browser/download/save_page_browsertest.cc index dbe7807..9bc7203 100644 --- a/chrome/browser/download/save_page_browsertest.cc +++ b/chrome/browser/download/save_page_browsertest.cc @@ -80,7 +80,7 @@ class SavePageBrowserTest : public InProcessBrowserTest { IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SaveHTMLOnly) { FilePath file_name(FILE_PATH_LITERAL("a.htm")); GURL url = URLRequestMockHTTPJob::GetMockUrl( - FilePath(kTestDir).Append(file_name).ToWStringHack()); + FilePath(kTestDir).Append(file_name)); ui_test_utils::NavigateToURL(browser(), url); TabContents* current_tab = browser()->GetSelectedTabContents(); @@ -105,7 +105,7 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SaveHTMLOnly) { IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, SaveCompleteHTML) { FilePath file_name(FILE_PATH_LITERAL("b.htm")); GURL url = URLRequestMockHTTPJob::GetMockUrl( - FilePath(kTestDir).Append(file_name).ToWStringHack()); + FilePath(kTestDir).Append(file_name)); ui_test_utils::NavigateToURL(browser(), url); TabContents* current_tab = browser()->GetSelectedTabContents(); @@ -146,7 +146,7 @@ IN_PROC_BROWSER_TEST_F(SavePageBrowserTest, FileNameFromPageTitle) { FilePath file_name(FILE_PATH_LITERAL("b.htm")); GURL url = URLRequestMockHTTPJob::GetMockUrl( - FilePath(kTestDir).Append(file_name).ToWStringHack()); + FilePath(kTestDir).Append(file_name)); ui_test_utils::NavigateToURL(browser(), url); FilePath full_file_name = save_dir_.path().AppendASCII( diff --git a/chrome/browser/download/save_page_uitest.cc b/chrome/browser/download/save_page_uitest.cc index fbed636..8774637 100644 --- a/chrome/browser/download/save_page_uitest.cc +++ b/chrome/browser/download/save_page_uitest.cc @@ -68,8 +68,8 @@ TEST_F(SavePageTest, CleanFilenameFromPageTitle) { download_dir_.AppendASCII(std::string("test.exe") + kAppendedExtension); FilePath dir = download_dir_.AppendASCII("test.exe_files"); - GURL url = URLRequestMockHTTPJob::GetMockUrl( - UTF8ToWide(std::string(kTestDir) + "/" + file_name)); + GURL url = URLRequestMockHTTPJob::GetMockUrl(FilePath(ASCIIToWide( + std::string(kTestDir) + "/" + file_name))); scoped_refptr<TabProxy> tab(GetActiveTab()); ASSERT_TRUE(tab.get()); ASSERT_TRUE(tab->NavigateToURL(url)); |