summaryrefslogtreecommitdiffstats
path: root/chrome/installer/util/master_preferences_unittest.cc
diff options
context:
space:
mode:
authorerikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 16:07:55 +0000
committererikkay@chromium.org <erikkay@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-18 16:07:55 +0000
commit33edeab42b851a5617a77caa1d65a3782a01ee7b (patch)
treed1baa44ff796c9f0c4881e9819e7e5b359489b1d /chrome/installer/util/master_preferences_unittest.cc
parentf348b92e95dd67fef3a9a6109bc0465fb4078d6b (diff)
downloadchromium_src-33edeab42b851a5617a77caa1d65a3782a01ee7b.zip
chromium_src-33edeab42b851a5617a77caa1d65a3782a01ee7b.tar.gz
chromium_src-33edeab42b851a5617a77caa1d65a3782a01ee7b.tar.bz2
Renames the function CreateTemporaryFilename to CreateTemporaryFile and track down all callers, also removes the
deprecated function that uses std::wstring. BUG=3078 (http://crbug.com/3078) TEST=run base_unittests, installer_util_unittests, net_unittests, setup_unittests, and unit_tests. Review URL: http://codereview.chromium.org/164537 Patch from Thiago Farina. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23631 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/master_preferences_unittest.cc')
-rw-r--r--chrome/installer/util/master_preferences_unittest.cc21
1 files changed, 9 insertions, 12 deletions
diff --git a/chrome/installer/util/master_preferences_unittest.cc b/chrome/installer/util/master_preferences_unittest.cc
index 8132374..24eacae 100644
--- a/chrome/installer/util/master_preferences_unittest.cc
+++ b/chrome/installer/util/master_preferences_unittest.cc
@@ -24,8 +24,8 @@ class MasterPreferencesTest : public testing::Test {
} // namespace
TEST(MasterPreferencesTest, ParseDistroParams) {
- std::wstring prefs_file;
- ASSERT_TRUE(file_util::CreateTemporaryFileName(&prefs_file));
+ FilePath prefs_file;
+ ASSERT_TRUE(file_util::CreateTemporaryFile(&prefs_file));
const char text[] =
"{ \n"
" \"distribution\": { \n"
@@ -54,8 +54,7 @@ TEST(MasterPreferencesTest, ParseDistroParams) {
EXPECT_TRUE(file_util::WriteFile(prefs_file, text, sizeof(text)));
scoped_ptr<DictionaryValue> prefs(
- installer_util::ParseDistributionPreferences(
- FilePath::FromWStringHack(prefs_file)));
+ installer_util::ParseDistributionPreferences(prefs_file));
EXPECT_TRUE(prefs.get() != NULL);
EXPECT_TRUE(installer_util::GetDistroBooleanPreference(prefs.get(),
installer_util::master_preferences::kDistroSkipFirstRunPref));
@@ -104,8 +103,8 @@ TEST(MasterPreferencesTest, ParseDistroParams) {
}
TEST(MasterPreferencesTest, ParseMissingDistroParams) {
- std::wstring prefs_file;
- ASSERT_TRUE(file_util::CreateTemporaryFileName(&prefs_file));
+ FilePath prefs_file;
+ ASSERT_TRUE(file_util::CreateTemporaryFile(&prefs_file));
const char text[] =
"{ \n"
" \"distribution\": { \n"
@@ -120,8 +119,7 @@ TEST(MasterPreferencesTest, ParseMissingDistroParams) {
EXPECT_TRUE(file_util::WriteFile(prefs_file, text, sizeof(text)));
scoped_ptr<DictionaryValue> prefs(
- installer_util::ParseDistributionPreferences(
- FilePath::FromWStringHack(prefs_file)));
+ installer_util::ParseDistributionPreferences(prefs_file));
EXPECT_TRUE(prefs.get() != NULL);
EXPECT_TRUE(installer_util::GetDistroBooleanPreference(prefs.get(),
installer_util::master_preferences::kDistroSkipFirstRunPref));
@@ -159,8 +157,8 @@ TEST(MasterPreferencesTest, ParseMissingDistroParams) {
}
TEST(MasterPreferencesTest, FirstRunTabs) {
- std::wstring prefs_file;
- ASSERT_TRUE(file_util::CreateTemporaryFileName(&prefs_file));
+ FilePath prefs_file;
+ ASSERT_TRUE(file_util::CreateTemporaryFile(&prefs_file));
const char text[] =
"{ \n"
" \"distribution\": { \n"
@@ -175,8 +173,7 @@ TEST(MasterPreferencesTest, FirstRunTabs) {
EXPECT_TRUE(file_util::WriteFile(prefs_file, text, sizeof(text)));
scoped_ptr<DictionaryValue> prefs(
- installer_util::ParseDistributionPreferences(
- FilePath::FromWStringHack(prefs_file)));
+ installer_util::ParseDistributionPreferences(prefs_file));
EXPECT_TRUE(prefs.get() != NULL);
typedef std::vector<std::wstring> TabsVector;