OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_UNITTEST_H_ | 5 #ifndef CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_UNITTEST_H_ |
6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_UNITTEST_H_ | 6 #define CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_UNITTEST_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "chrome/browser/policy/configuration_policy_handler_list.h" | 11 #include "chrome/browser/policy/configuration_policy_handler_list.h" |
12 #include "chrome/browser/policy/mock_configuration_policy_provider.h" | |
13 #include "chrome/browser/policy/policy_service_impl.h" | 12 #include "chrome/browser/policy/policy_service_impl.h" |
| 13 #include "components/policy/core/common/mock_configuration_policy_provider.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace policy { | 16 namespace policy { |
17 | 17 |
18 class PolicyMap; | 18 class PolicyMap; |
19 class PolicyService; | 19 class PolicyService; |
20 class ConfigurationPolicyPrefStore; | 20 class ConfigurationPolicyPrefStore; |
21 | 21 |
22 class ConfigurationPolicyPrefStoreTest : public testing::Test { | 22 class ConfigurationPolicyPrefStoreTest : public testing::Test { |
23 protected: | 23 protected: |
24 ConfigurationPolicyPrefStoreTest(); | 24 ConfigurationPolicyPrefStoreTest(); |
25 virtual ~ConfigurationPolicyPrefStoreTest(); | 25 virtual ~ConfigurationPolicyPrefStoreTest(); |
26 virtual void TearDown() OVERRIDE; | 26 virtual void TearDown() OVERRIDE; |
27 void UpdateProviderPolicy(const PolicyMap& policy); | 27 void UpdateProviderPolicy(const PolicyMap& policy); |
28 | 28 |
29 PolicyServiceImpl::Providers providers_; | 29 PolicyServiceImpl::Providers providers_; |
30 ConfigurationPolicyHandlerList handler_list_; | 30 ConfigurationPolicyHandlerList handler_list_; |
31 MockConfigurationPolicyProvider provider_; | 31 MockConfigurationPolicyProvider provider_; |
32 scoped_ptr<PolicyService> policy_service_; | 32 scoped_ptr<PolicyService> policy_service_; |
33 scoped_refptr<ConfigurationPolicyPrefStore> store_; | 33 scoped_refptr<ConfigurationPolicyPrefStore> store_; |
34 base::MessageLoop loop_; | 34 base::MessageLoop loop_; |
35 | 35 |
36 private: | 36 private: |
37 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStoreTest); | 37 DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyPrefStoreTest); |
38 }; | 38 }; |
39 | 39 |
40 } // namespace policy | 40 } // namespace policy |
41 | 41 |
42 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_UNITTEST_H_ | 42 #endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PREF_STORE_UNITTEST_H_ |
OLD | NEW |