diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 20:00:14 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-26 20:00:14 +0000 |
commit | 53c5804ed27befcf9305e0963bf5318221209ca3 (patch) | |
tree | 7c8a558cb152e6d6f821cd927951f13f5451f531 /chrome | |
parent | 6f6f21ab8e11c252affd2dc3d1b4c1975cb18b15 (diff) | |
download | chromium_src-53c5804ed27befcf9305e0963bf5318221209ca3.zip chromium_src-53c5804ed27befcf9305e0963bf5318221209ca3.tar.gz chromium_src-53c5804ed27befcf9305e0963bf5318221209ca3.tar.bz2 |
Avoids the use of ToWStringHack in a few places.
BUG=None
TEST=run app_unittests.exe, browser_tests.exe and selenium_tests.exe
Review URL: http://codereview.chromium.org/173418
Patch from Thiago Farina <thiago.farina@gmail.com>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24504 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/privacy_blacklist/blacklist_unittest.cc | 7 | ||||
-rw-r--r-- | chrome/test/selenium/selenium_test.cc | 20 | ||||
-rw-r--r-- | chrome/test/unit/chrome_test_suite.h | 3 |
3 files changed, 14 insertions, 16 deletions
diff --git a/chrome/browser/privacy_blacklist/blacklist_unittest.cc b/chrome/browser/privacy_blacklist/blacklist_unittest.cc index f7648b5..f979aaf 100644 --- a/chrome/browser/privacy_blacklist/blacklist_unittest.cc +++ b/chrome/browser/privacy_blacklist/blacklist_unittest.cc @@ -13,12 +13,11 @@ TEST(BlacklistTest, Generic) { // Get path relative to test data dir. - std::wstring input; + FilePath input; PathService::Get(chrome::DIR_TEST_DATA, &input); - file_util::AppendToPath(&input, L"blacklist_small.pbr"); + input = input.AppendASCII("blacklist_small.pbr"); - FilePath path = FilePath::FromWStringHack(input); - Blacklist blacklist(path); + Blacklist blacklist(input); // This test is a friend, so inspect the internal structures. EXPECT_EQ(5U, blacklist.blacklist_.size()); diff --git a/chrome/test/selenium/selenium_test.cc b/chrome/test/selenium/selenium_test.cc index f2ef32d..f5710f7 100644 --- a/chrome/test/selenium/selenium_test.cc +++ b/chrome/test/selenium/selenium_test.cc @@ -92,17 +92,17 @@ class SeleniumTest : public UITest { }; *failed = kBogusFailures[base::RandInt(0, 2)]; #else - std::wstring test_path; + FilePath test_path; PathService::Get(chrome::DIR_TEST_DATA, &test_path); - file_util::UpOneDirectory(&test_path); - file_util::UpOneDirectory(&test_path); - file_util::UpOneDirectory(&test_path); - file_util::AppendToPath(&test_path, L"data"); - file_util::AppendToPath(&test_path, L"selenium_core"); - file_util::AppendToPath(&test_path, L"core"); - file_util::AppendToPath(&test_path, L"TestRunner.html"); - - GURL test_url(net::FilePathToFileURL(FilePath::FromWStringHack(test_path))); + test_path = test_path.DirName(); + test_path = test_path.DirName(); + test_path = test_path.DirName(); + test_path = test_path.AppendASCII("data"); + test_path = test_path.AppendASCII("selenium_core"); + test_path = test_path.AppendASCII("core"); + test_path = test_path.AppendASCII("TestRunner.html"); + + GURL test_url(net::FilePathToFileURL(test_path)); scoped_refptr<TabProxy> tab(GetActiveTab()); tab->NavigateToURL(test_url); diff --git a/chrome/test/unit/chrome_test_suite.h b/chrome/test/unit/chrome_test_suite.h index 7f8733b..536ff37 100644 --- a/chrome/test/unit/chrome_test_suite.h +++ b/chrome/test/unit/chrome_test_suite.h @@ -93,8 +93,7 @@ class ChromeTestSuite : public TestSuite { user_data_dir = user_data_dir.AppendASCII("test_user_data"); } if (!user_data_dir.empty()) - PathService::Override(chrome::DIR_USER_DATA, - user_data_dir.ToWStringHack()); + PathService::Override(chrome::DIR_USER_DATA, user_data_dir); #if defined(OS_MACOSX) FilePath path; |