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

Unified Diff: components/policy/core/browser/configuration_policy_pref_store_unittest.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad rebase Created 6 years, 5 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
Index: components/policy/core/browser/configuration_policy_pref_store_unittest.cc
diff --git a/components/policy/core/browser/configuration_policy_pref_store_unittest.cc b/components/policy/core/browser/configuration_policy_pref_store_unittest.cc
index e307f98006c650729291767745fa192385ed4283..35d91ee01d2313b8d3c5c0e402f7bf4052884efe 100644
--- a/components/policy/core/browser/configuration_policy_pref_store_unittest.cc
+++ b/components/policy/core/browser/configuration_policy_pref_store_unittest.cc
@@ -52,8 +52,8 @@ TEST_F(ConfigurationPolicyPrefStoreListTest, GetDefault) {
TEST_F(ConfigurationPolicyPrefStoreListTest, SetValue) {
base::ListValue* in_value = new base::ListValue();
- in_value->Append(base::Value::CreateStringValue("test1"));
- in_value->Append(base::Value::CreateStringValue("test2,"));
+ in_value->Append(new base::StringValue("test1"));
+ in_value->Append(new base::StringValue("test2,"));
PolicyMap policy;
policy.Set(kTestPolicy, POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER, in_value, NULL);
@@ -80,9 +80,11 @@ TEST_F(ConfigurationPolicyPrefStoreStringTest, GetDefault) {
TEST_F(ConfigurationPolicyPrefStoreStringTest, SetValue) {
PolicyMap policy;
- policy.Set(kTestPolicy, POLICY_LEVEL_MANDATORY,
+ policy.Set(kTestPolicy,
+ POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- base::Value::CreateStringValue("http://chromium.org"), NULL);
+ new base::StringValue("http://chromium.org"),
+ NULL);
UpdateProviderPolicy(policy);
const base::Value* value = NULL;
EXPECT_TRUE(store_->GetValue(kTestPref, &value));
@@ -189,7 +191,7 @@ TEST_F(ConfigurationPolicyPrefStoreRefreshTest, Refresh) {
policy.Set(kTestPolicy,
POLICY_LEVEL_MANDATORY,
POLICY_SCOPE_USER,
- base::Value::CreateStringValue("http://www.chromium.org"),
+ new base::StringValue("http://www.chromium.org"),
NULL);
UpdateProviderPolicy(policy);
observer_.VerifyAndResetChangedKey(kTestPref);

Powered by Google App Engine
This is Rietveld 408576698