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

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

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: retry Created 9 years, 11 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/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index 123b2924d03ea3a11ef7eede4b3acc0efd356d47..fba376162de962d929f632c21f1ba45f2d6f8fd3 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -373,8 +373,8 @@ class DownloadTest : public InProcessBrowserTest {
// |expected_title_in_finished| need to be checked.
Avi (use Gerrit) 2011/02/04 19:24:53 Nitpicky of me: Fix the name of the variable in th
evanm 2011/02/04 19:37:12 Done.
bool RunSizeTest(Browser* browser,
const GURL& url,
- const std::wstring& expected_title_in_progress,
- const std::wstring& expected_title_finished) {
+ const string16& expected_title_in_progress,
+ const string16& expected_title_finished) {
if (!InitialSetup(false))
return false;
@@ -613,10 +613,11 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DISABLED_UnknownSize) {
FilePath filename;
net::FileURLToFilePath(url, &filename);
filename = filename.BaseName();
- ASSERT_TRUE(RunSizeTest(browser(),
- url,
- L"32.0 KB - " + filename.ToWStringHack(),
- L"100% - " + filename.ToWStringHack()));
+ ASSERT_TRUE(RunSizeTest(
+ browser(),
+ url,
+ ASCIIToUTF16("32.0 KB - ") + filename.LossyDisplayName(),
+ ASCIIToUTF16("100% - ") + filename.LossyDisplayName()));
}
// Test is believed mostly good (non-flaky) in itself, but it
@@ -629,10 +630,11 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, DISABLED_KnownSize) {
FilePath filename;
net::FileURLToFilePath(url, &filename);
filename = filename.BaseName();
- ASSERT_TRUE(RunSizeTest(browser(),
- url,
- L"71% - " + filename.ToWStringHack(),
- L"100% - " + filename.ToWStringHack()));
+ ASSERT_TRUE(RunSizeTest(
+ browser(),
+ url,
+ ASCIIToUTF16("71% - ") + filename.LossyDisplayName(),
+ ASCIIToUTF16("100% - ") + filename.LossyDisplayName()));
}
// Test that when downloading an item in Incognito mode, we don't crash when

Powered by Google App Engine
This is Rietveld 408576698