summaryrefslogtreecommitdiffstats
path: root/chrome/installer
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 19:36:31 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-14 19:36:31 +0000
commitb65de8b9d5bfa020d97122c1eff2115fa8e97561 (patch)
tree3eb86aed4e3352cbca7cc4b78e76f5ee26d7388c /chrome/installer
parent5e70f14644629b7f9fe9126553758aed25e17128 (diff)
downloadchromium_src-b65de8b9d5bfa020d97122c1eff2115fa8e97561.zip
chromium_src-b65de8b9d5bfa020d97122c1eff2115fa8e97561.tar.gz
chromium_src-b65de8b9d5bfa020d97122c1eff2115fa8e97561.tar.bz2
Fix to use FilePath in more unittests.
Landing patch for Thiago Farina, original review: http://codereview.chromium.org/187005 BUG=None TEST=run unit_tests.exe, base_unittests.exe. Review URL: http://codereview.chromium.org/193101 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26142 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer')
-rw-r--r--chrome/installer/setup/setup_util_unittest.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc
index 39003bc..34a26fe 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");