diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 03:02:51 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-11 03:02:51 +0000 |
commit | 57ecc4bf4069cb869e5fb0a7d922eec2384bac25 (patch) | |
tree | 1b4668fa59d6b6a072144b4ddab8d5f6faba3fa4 /chrome/common/json_pref_store_unittest.cc | |
parent | 1af19cfd7b1ef9924516dbe811db495315feaefe (diff) | |
download | chromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.zip chromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.tar.gz chromium_src-57ecc4bf4069cb869e5fb0a7d922eec2384bac25.tar.bz2 |
Make prefs use std::string for keys rather than wstrings.
Much remains to be converted.
BUG=23581
TEST=builds and passes tests
Review URL: http://codereview.chromium.org/3076037
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55660 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/json_pref_store_unittest.cc')
-rw-r--r-- | chrome/common/json_pref_store_unittest.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/chrome/common/json_pref_store_unittest.cc b/chrome/common/json_pref_store_unittest.cc index 8f05fd8..e38aba2 100644 --- a/chrome/common/json_pref_store_unittest.cc +++ b/chrome/common/json_pref_store_unittest.cc @@ -99,17 +99,17 @@ TEST_F(JsonPrefStoreTest, Basic) { // } // } - const wchar_t kNewWindowsInTabs[] = L"tabs.new_windows_in_tabs"; - const wchar_t kMaxTabs[] = L"tabs.max_tabs"; - const wchar_t kLongIntPref[] = L"long_int.pref"; + const char kNewWindowsInTabs[] = "tabs.new_windows_in_tabs"; + const char kMaxTabs[] = "tabs.max_tabs"; + const char kLongIntPref[] = "long_int.pref"; - std::wstring cnn(L"http://www.cnn.com"); + std::string cnn("http://www.cnn.com"); - std::wstring string_value; + std::string string_value; EXPECT_TRUE(prefs->GetString(prefs::kHomePage, &string_value)); EXPECT_EQ(cnn, string_value); - const wchar_t kSomeDirectory[] = L"some_directory"; + const char kSomeDirectory[] = "some_directory"; FilePath::StringType path; EXPECT_TRUE(prefs->GetString(kSomeDirectory, &path)); @@ -135,11 +135,10 @@ TEST_F(JsonPrefStoreTest, Basic) { EXPECT_TRUE(prefs->GetInteger(kMaxTabs, &integer)); EXPECT_EQ(10, integer); - prefs->SetString(kLongIntPref, - UTF8ToWide(base::Int64ToString(214748364842LL))); + prefs->SetString(kLongIntPref, base::Int64ToString(214748364842LL)); EXPECT_TRUE(prefs->GetString(kLongIntPref, &string_value)); int64 value; - base::StringToInt64(WideToUTF8(string_value), &value); + base::StringToInt64(string_value, &value); EXPECT_EQ(214748364842LL, value); // Serialize and compare to expected output. |