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

Unified Diff: chrome/installer/setup/setup_util_unittest.cc

Issue 193101: Fix to use FilePath in more unittests. (Closed)
Patch Set: Created 11 years, 3 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/privacy_blacklist/blacklist_io_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/setup/setup_util_unittest.cc
diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc
index 39003bc11d568c4cf585c5e67a182dddbfae3579..34a26fea90245d56d7d4785a959f71a4454499e1 100644
--- a/chrome/installer/setup/setup_util_unittest.cc
+++ b/chrome/installer/setup/setup_util_unittest.cc
@@ -135,9 +135,8 @@ TEST_F(SetupUtilTest, GetInstallPreferencesTest) {
// Test that we are parsing Chrome version correctly.
TEST_F(SetupUtilTest, GetVersionFromDirTest) {
// Create a version dir
- std::wstring chrome_dir(test_dir_.value());
- file_util::AppendToPath(&chrome_dir, L"1.0.0.0");
- CreateDirectory(chrome_dir.c_str(), NULL);
+ FilePath chrome_dir = test_dir_.AppendASCII("1.0.0.0");
+ file_util::CreateDirectory(chrome_dir);
ASSERT_TRUE(file_util::PathExists(chrome_dir));
scoped_ptr<installer::Version> version(
setup_util::GetVersionFromDir(test_dir_.value()));
@@ -147,15 +146,13 @@ TEST_F(SetupUtilTest, GetVersionFromDirTest) {
ASSERT_FALSE(file_util::PathExists(chrome_dir));
ASSERT_TRUE(setup_util::GetVersionFromDir(test_dir_.value()) == NULL);
- chrome_dir = test_dir_.value();
- file_util::AppendToPath(&chrome_dir, L"ABC");
- CreateDirectory(chrome_dir.c_str(), NULL);
+ chrome_dir = test_dir_.AppendASCII("ABC");
+ file_util::CreateDirectory(chrome_dir);
ASSERT_TRUE(file_util::PathExists(chrome_dir));
ASSERT_TRUE(setup_util::GetVersionFromDir(test_dir_.value()) == NULL);
- chrome_dir = test_dir_.value();
- file_util::AppendToPath(&chrome_dir, L"2.3.4.5");
- CreateDirectory(chrome_dir.c_str(), NULL);
+ chrome_dir = test_dir_.AppendASCII("2.3.4.5");
+ file_util::CreateDirectory(chrome_dir);
ASSERT_TRUE(file_util::PathExists(chrome_dir));
version.reset(setup_util::GetVersionFromDir(test_dir_.value()));
ASSERT_TRUE(version->GetString() == L"2.3.4.5");
« no previous file with comments | « chrome/browser/privacy_blacklist/blacklist_io_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698