OLD | NEW |
| (Empty) |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_POLICY_CLOUD_MOCK_CLOUD_POLICY_STORE_H_ | |
6 #define CHROME_BROWSER_POLICY_CLOUD_MOCK_CLOUD_POLICY_STORE_H_ | |
7 | |
8 #include "chrome/browser/policy/cloud/cloud_policy_store.h" | |
9 #include "testing/gmock/include/gmock/gmock.h" | |
10 | |
11 namespace policy { | |
12 | |
13 class MockCloudPolicyStore : public CloudPolicyStore { | |
14 public: | |
15 MockCloudPolicyStore(); | |
16 virtual ~MockCloudPolicyStore(); | |
17 | |
18 MOCK_METHOD1(Store, void(const enterprise_management::PolicyFetchResponse&)); | |
19 MOCK_METHOD0(Load, void(void)); | |
20 | |
21 // Publish the protected members. | |
22 using CloudPolicyStore::NotifyStoreLoaded; | |
23 using CloudPolicyStore::NotifyStoreError; | |
24 | |
25 using CloudPolicyStore::policy_map_; | |
26 using CloudPolicyStore::policy_; | |
27 using CloudPolicyStore::status_; | |
28 using CloudPolicyStore::invalidation_version_; | |
29 | |
30 private: | |
31 DISALLOW_COPY_AND_ASSIGN(MockCloudPolicyStore); | |
32 }; | |
33 | |
34 class MockCloudPolicyStoreObserver : public CloudPolicyStore::Observer { | |
35 public: | |
36 MockCloudPolicyStoreObserver(); | |
37 virtual ~MockCloudPolicyStoreObserver(); | |
38 | |
39 MOCK_METHOD1(OnStoreLoaded, void(CloudPolicyStore* store)); | |
40 MOCK_METHOD1(OnStoreError, void(CloudPolicyStore* store)); | |
41 | |
42 private: | |
43 DISALLOW_COPY_AND_ASSIGN(MockCloudPolicyStoreObserver); | |
44 }; | |
45 | |
46 } // namespace policy | |
47 | |
48 #endif // CHROME_BROWSER_POLICY_CLOUD_MOCK_CLOUD_POLICY_STORE_H_ | |
OLD | NEW |