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

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

Issue 6246036: FilePath: Remove most of ToWStringHack, adding a LossyDisplayName() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: bug link 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
« no previous file with comments | « chrome/browser/download/download_item.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/download/download_uitest.cc
diff --git a/chrome/browser/download/download_uitest.cc b/chrome/browser/download/download_uitest.cc
index 743642c7d8550ac6903d3208121e647c32d6389c..0f6971a589b1d2b2aabca2fd2327b36a25e4a305 100644
--- a/chrome/browser/download/download_uitest.cc
+++ b/chrome/browser/download/download_uitest.cc
@@ -79,8 +79,8 @@ class DownloadTest : public UITest {
protected:
void RunSizeTest(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) {
FilePath filename;
net::FileURLToFilePath(url, &filename);
filename = filename.BaseName();
@@ -242,8 +242,9 @@ TEST_F(DownloadTest, FLAKY_UnknownSize) {
FilePath filename;
net::FileURLToFilePath(url, &filename);
filename = filename.BaseName();
- RunSizeTest(url, L"32.0 KB - " + filename.ToWStringHack(),
- L"100% - " + filename.ToWStringHack());
+ RunSizeTest(url,
+ ASCIIToUTF16("32.0 KB - ") + filename.LossyDisplayName(),
+ ASCIIToUTF16("100% - ") + filename.LossyDisplayName());
}
// All download tests are flaky on all platforms, http://crbug.com/35275,
@@ -254,8 +255,9 @@ TEST_F(DownloadTest, FLAKY_KnownSize) {
FilePath filename;
net::FileURLToFilePath(url, &filename);
filename = filename.BaseName();
- RunSizeTest(url, L"71% - " + filename.ToWStringHack(),
- L"100% - " + filename.ToWStringHack());
+ RunSizeTest(url,
+ ASCIIToUTF16("71% - ") + filename.LossyDisplayName(),
+ ASCIIToUTF16("100% - ") + filename.LossyDisplayName());
}
// Test that when downloading an item in Incognito mode, we don't crash when
« no previous file with comments | « chrome/browser/download/download_item.cc ('k') | chrome/browser/extensions/extension_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698