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

Unified Diff: base/prefs/pref_service_unittest.cc

Issue 131503015: Get rid of some uses of base::Create*Value (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more Created 6 years, 11 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 | « base/prefs/pref_service.cc ('k') | base/values.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/prefs/pref_service_unittest.cc
diff --git a/base/prefs/pref_service_unittest.cc b/base/prefs/pref_service_unittest.cc
index ff6bb2f2de361e9ac385ce5f711293ad1397e528..36ad887df2ca464cd0d86b0fac547dafc1557ce0 100644
--- a/base/prefs/pref_service_unittest.cc
+++ b/base/prefs/pref_service_unittest.cc
@@ -79,7 +79,7 @@ TEST(PrefServiceTest, Observers) {
TestingPrefServiceSimple prefs;
prefs.SetUserPref(pref_name,
- base::Value::CreateStringValue("http://www.cnn.com"));
+ new base::StringValue("http://www.cnn.com"));
prefs.registry()->RegisterStringPref(pref_name, std::string());
const char new_pref_value[] = "http://www.google.com/";
@@ -138,7 +138,7 @@ TEST(PrefServiceTest, GetValueChangedType) {
// Check falling back to a recommended value.
prefs.SetUserPref(kPrefName,
- base::Value::CreateStringValue("not an integer"));
+ new base::StringValue("not an integer"));
const PrefService::Preference* pref = prefs.FindPreference(kPrefName);
ASSERT_TRUE(pref);
const base::Value* value = pref->GetValue();
@@ -173,7 +173,7 @@ TEST(PrefServiceTest, GetValueAndGetRecommendedValue) {
ASSERT_FALSE(value);
// Set a user-set value.
- prefs.SetUserPref(kPrefName, base::Value::CreateIntegerValue(kUserValue));
+ prefs.SetUserPref(kPrefName, new base::FundamentalValue(kUserValue));
// Check that GetValue() returns the user-set value.
value = pref->GetValue();
@@ -189,7 +189,7 @@ TEST(PrefServiceTest, GetValueAndGetRecommendedValue) {
// Set a recommended value.
prefs.SetRecommendedPref(kPrefName,
- base::Value::CreateIntegerValue(kRecommendedValue));
+ new base::FundamentalValue(kRecommendedValue));
// Check that GetValue() returns the user-set value.
value = pref->GetValue();
@@ -302,7 +302,7 @@ TEST_F(PrefServiceSetValueTest, SetListValue) {
Mock::VerifyAndClearExpectations(&observer_);
base::ListValue new_value;
- new_value.Append(base::Value::CreateStringValue(kValue));
+ new_value.Append(new base::StringValue(kValue));
observer_.Expect(kName, &new_value);
prefs_.Set(kName, new_value);
Mock::VerifyAndClearExpectations(&observer_);
« no previous file with comments | « base/prefs/pref_service.cc ('k') | base/values.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698