OLD | NEW |
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium OS 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 LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ | 5 #ifndef LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ |
6 #define LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ | 6 #define LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ |
7 | 7 |
8 #include "login_manager/device_policy.h" | 8 #include "login_manager/device_policy.h" |
9 | 9 |
10 #include <unistd.h> | 10 #include <unistd.h> |
11 #include <gmock/gmock.h> | 11 #include <gmock/gmock.h> |
12 | 12 |
13 namespace login_manager { | 13 namespace login_manager { |
14 class MockDevicePolicy : public DevicePolicy { | 14 class MockDevicePolicy : public DevicePolicy { |
15 public: | 15 public: |
16 MockDevicePolicy() : DevicePolicy(FilePath("")) {} | 16 MockDevicePolicy() : DevicePolicy(FilePath("")) {} |
17 virtual ~MockDevicePolicy() {} | 17 virtual ~MockDevicePolicy() {} |
18 MOCK_METHOD0(LoadOrCreate, bool(void)); | 18 MOCK_METHOD0(LoadOrCreate, bool(void)); |
19 MOCK_METHOD0(Persist, bool(void)); | 19 MOCK_METHOD0(Persist, bool(void)); |
20 MOCK_CONST_METHOD1(Get, bool(std::string*)); | 20 MOCK_CONST_METHOD0(Get, const enterprise_management::PolicyFetchResponse&()); |
| 21 MOCK_CONST_METHOD1(SerializeToString, bool(std::string*)); |
21 MOCK_METHOD1(Set, void(const enterprise_management::PolicyFetchResponse&)); | 22 MOCK_METHOD1(Set, void(const enterprise_management::PolicyFetchResponse&)); |
22 }; | 23 }; |
23 } // namespace login_manager | 24 } // namespace login_manager |
24 | 25 |
25 #endif // LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ | 26 #endif // LOGIN_MANAGER_MOCK_DEVICE_POLICY_H_ |
OLD | NEW |