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

Unified Diff: components/policy/core/common/forwarding_policy_provider_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/common/forwarding_policy_provider_unittest.cc
diff --git a/components/policy/core/common/forwarding_policy_provider_unittest.cc b/components/policy/core/common/forwarding_policy_provider_unittest.cc
index 94bf0e56bf08847f297f5b753f893e4cbc6f0bab..0a8ae35d1b1e7bb5eecc0281fa95b0088266dec5 100644
--- a/components/policy/core/common/forwarding_policy_provider_unittest.cc
+++ b/components/policy/core/common/forwarding_policy_provider_unittest.cc
@@ -81,15 +81,21 @@ TEST_F(ForwardingPolicyProviderTest, Empty) {
TEST_F(ForwardingPolicyProviderTest, ForwardsChromePolicy) {
PolicyBundle bundle;
const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, "");
- bundle.Get(chrome_ns).Set("policy", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("value"), NULL);
+ bundle.Get(chrome_ns).Set("policy",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("value"),
+ NULL);
EXPECT_CALL(observer_, OnUpdatePolicy(&forwarding_provider_));
scoped_ptr<PolicyBundle> delegate_bundle(new PolicyBundle);
delegate_bundle->CopyFrom(bundle);
delegate_bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
- .Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("not forwarded"), NULL);
+ .Set("foo",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("not forwarded"),
+ NULL);
mock_provider_.UpdatePolicy(delegate_bundle.Pass());
Mock::VerifyAndClearExpectations(&observer_);
@@ -116,8 +122,11 @@ TEST_F(ForwardingPolicyProviderTest, SchemaReady) {
TEST_F(ForwardingPolicyProviderTest, SchemaReadyWithComponents) {
PolicyMap policy_map;
- policy_map.Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("omg"), NULL);
+ policy_map.Set("foo",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("omg"),
+ NULL);
scoped_ptr<PolicyBundle> bundle(new PolicyBundle);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, "")).CopyFrom(policy_map);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
@@ -162,8 +171,11 @@ TEST_F(ForwardingPolicyProviderTest, DelegateUpdates) {
policy::POLICY_DOMAIN_EXTENSIONS));
PolicyMap policy_map;
- policy_map.Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("omg"), NULL);
+ policy_map.Set("foo",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("omg"),
+ NULL);
// Chrome policy updates are forwarded even if the components aren't ready.
EXPECT_CALL(observer_, OnUpdatePolicy(&forwarding_provider_));
mock_provider_.UpdateChromePolicy(policy_map);
@@ -202,8 +214,11 @@ TEST_F(ForwardingPolicyProviderTest, RemoveAndAddComponent) {
// Serve policy for |ns|.
PolicyBundle platform_policy;
- platform_policy.Get(ns).Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- base::Value::CreateStringValue("omg"), NULL);
+ platform_policy.Get(ns).Set("foo",
+ POLICY_LEVEL_MANDATORY,
+ POLICY_SCOPE_USER,
+ new base::StringValue("omg"),
+ NULL);
scoped_ptr<PolicyBundle> copy(new PolicyBundle);
copy->CopyFrom(platform_policy);
EXPECT_CALL(observer_, OnUpdatePolicy(_));
« no previous file with comments | « components/policy/core/common/configuration_policy_provider_test.cc ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698