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

Unified Diff: components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc

Issue 2664753002: Remove base::StringValue (Closed)
Patch Set: Rebase Created 3 years, 9 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/schema_registry_tracking_policy_provider_unittest.cc
diff --git a/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc b/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
index 5513e8a50e7b262341f445ca34b94e2c6fc15f3b..fd6668dc4553561ed9005a5913aaa0fd42f7625a 100644
--- a/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
+++ b/components/policy/core/common/schema_registry_tracking_policy_provider_unittest.cc
@@ -85,17 +85,17 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, Empty) {
TEST_F(SchemaRegistryTrackingPolicyProviderTest, PassOnChromePolicy) {
PolicyBundle bundle;
const PolicyNamespace chrome_ns(POLICY_DOMAIN_CHROME, "");
- bundle.Get(chrome_ns).Set(
- "policy", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::StringValue>("visible"), nullptr);
+ bundle.Get(chrome_ns).Set("policy", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
+ base::MakeUnique<base::Value>("visible"), nullptr);
EXPECT_CALL(observer_, OnUpdatePolicy(&schema_registry_tracking_provider_));
std::unique_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,
- POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::StringValue>("not visible"), nullptr);
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>("not visible"),
+ nullptr);
mock_provider_.UpdatePolicy(std::move(delegate_bundle));
Mock::VerifyAndClearExpectations(&observer_);
@@ -122,8 +122,8 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, SchemaReady) {
TEST_F(SchemaRegistryTrackingPolicyProviderTest, SchemaReadyWithComponents) {
PolicyMap policy_map;
policy_map.Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::StringValue>("omg"), nullptr);
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>("omg"),
+ nullptr);
std::unique_ptr<PolicyBundle> bundle(new PolicyBundle);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_CHROME, "")).CopyFrom(policy_map);
bundle->Get(PolicyNamespace(POLICY_DOMAIN_EXTENSIONS, "xyz"))
@@ -171,8 +171,8 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, DelegateUpdates) {
PolicyMap policy_map;
policy_map.Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
- POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::StringValue>("omg"), nullptr);
+ POLICY_SOURCE_CLOUD, base::MakeUnique<base::Value>("omg"),
+ nullptr);
// Chrome policy updates are visible even if the components aren't ready.
EXPECT_CALL(observer_, OnUpdatePolicy(&schema_registry_tracking_provider_));
mock_provider_.UpdateChromePolicy(policy_map);
@@ -209,9 +209,9 @@ TEST_F(SchemaRegistryTrackingPolicyProviderTest, RemoveAndAddComponent) {
// Serve policy for |ns|.
PolicyBundle platform_policy;
- platform_policy.Get(ns).Set(
- "foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, POLICY_SOURCE_CLOUD,
- base::MakeUnique<base::StringValue>("omg"), nullptr);
+ platform_policy.Get(ns).Set("foo", POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
+ POLICY_SOURCE_CLOUD,
+ base::MakeUnique<base::Value>("omg"), nullptr);
std::unique_ptr<PolicyBundle> copy(new PolicyBundle);
copy->CopyFrom(platform_policy);
EXPECT_CALL(observer_, OnUpdatePolicy(_));
« no previous file with comments | « components/policy/core/common/schema_map_unittest.cc ('k') | components/policy/core/common/schema_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698