| Index: components/policy/core/common/cloud/cloud_policy_service_unittest.cc
|
| diff --git a/components/policy/core/common/cloud/cloud_policy_service_unittest.cc b/components/policy/core/common/cloud/cloud_policy_service_unittest.cc
|
| index 005316618670f73ff4655c600a5ec9b975619b42..42b0b56d1abc93e281beefbc383133d4815a5786 100644
|
| --- a/components/policy/core/common/cloud/cloud_policy_service_unittest.cc
|
| +++ b/components/policy/core/common/cloud/cloud_policy_service_unittest.cc
|
| @@ -32,13 +32,13 @@ class MockCloudPolicyServiceObserver : public CloudPolicyService::Observer {
|
| class CloudPolicyServiceTest : public testing::Test {
|
| public:
|
| CloudPolicyServiceTest()
|
| - : policy_ns_key_(dm_protocol::kChromeUserPolicyType, std::string()),
|
| - service_(policy_ns_key_, &client_, &store_) {}
|
| + : policy_type_(dm_protocol::kChromeUserPolicyType),
|
| + service_(policy_type_, "", &client_, &store_) {}
|
|
|
| MOCK_METHOD1(OnPolicyRefresh, void(bool));
|
|
|
| protected:
|
| - PolicyNamespaceKey policy_ns_key_;
|
| + std::string policy_type_;
|
| MockCloudPolicyClient client_;
|
| MockCloudPolicyStore store_;
|
| CloudPolicyService service_;
|
| @@ -61,7 +61,7 @@ TEST_F(CloudPolicyServiceTest, ManagedByValidPolicy) {
|
| TEST_F(CloudPolicyServiceTest, PolicyUpdateSuccess) {
|
| em::PolicyFetchResponse policy;
|
| policy.set_policy_data("fake policy");
|
| - client_.SetPolicy(policy_ns_key_, policy);
|
| + client_.SetPolicy(policy_type_, "", policy);
|
| EXPECT_CALL(store_, Store(ProtoMatches(policy))).Times(1);
|
| client_.NotifyPolicyFetched();
|
|
|
| @@ -104,7 +104,7 @@ TEST_F(CloudPolicyServiceTest, RefreshPolicySuccess) {
|
| // Client responds, push policy to store.
|
| em::PolicyFetchResponse policy;
|
| policy.set_policy_data("fake policy");
|
| - client_.SetPolicy(policy_ns_key_, policy);
|
| + client_.SetPolicy(policy_type_, "", policy);
|
| client_.fetched_invalidation_version_ = 12345;
|
| EXPECT_CALL(store_, Store(ProtoMatches(policy))).Times(1);
|
| EXPECT_EQ(0, store_.invalidation_version());
|
| @@ -160,7 +160,7 @@ TEST_F(CloudPolicyServiceTest, RefreshPolicyStoreError) {
|
| // Client responds, push policy to store.
|
| em::PolicyFetchResponse policy;
|
| policy.set_policy_data("fake policy");
|
| - client_.SetPolicy(policy_ns_key_, policy);
|
| + client_.SetPolicy(policy_type_, "", policy);
|
| EXPECT_CALL(store_, Store(ProtoMatches(policy))).Times(1);
|
| client_.NotifyPolicyFetched();
|
|
|
| @@ -188,7 +188,7 @@ TEST_F(CloudPolicyServiceTest, RefreshPolicyConcurrent) {
|
| // Client responds, push policy to store.
|
| em::PolicyFetchResponse policy;
|
| policy.set_policy_data("fake policy");
|
| - client_.SetPolicy(policy_ns_key_, policy);
|
| + client_.SetPolicy(policy_type_, "", policy);
|
| EXPECT_CALL(store_, Store(ProtoMatches(policy))).Times(1);
|
| client_.NotifyPolicyFetched();
|
|
|
| @@ -214,7 +214,7 @@ TEST_F(CloudPolicyServiceTest, StoreAlreadyInitialized) {
|
| // Service should start off initialized if the store has already loaded
|
| // policy.
|
| store_.NotifyStoreLoaded();
|
| - CloudPolicyService service(policy_ns_key_, &client_, &store_);
|
| + CloudPolicyService service(policy_type_, "", &client_, &store_);
|
| EXPECT_TRUE(service.IsInitializationComplete());
|
| }
|
|
|
|
|