OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 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_DEVICE_MANAGEMENT_BACKEND_MOCK_H_ |
| 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_MOCK_H_ |
| 7 |
| 8 #include "testing/gmock/include/gmock/gmock.h" |
| 9 |
| 10 namespace policy { |
| 11 |
| 12 // Mock classes for the various DeviceManagementBackend delegates that allow to |
| 13 // capture callbacks using gmock. |
| 14 class DeviceRegisterResponseDelegateMock |
| 15 : public DeviceManagementBackend::DeviceRegisterResponseDelegate { |
| 16 public: |
| 17 MOCK_METHOD1(HandleRegisterResponse, void(const em::DeviceRegisterResponse&)); |
| 18 MOCK_METHOD1(OnError, void(DeviceManagementBackend::ErrorCode error)); |
| 19 }; |
| 20 |
| 21 class DeviceUnregisterResponseDelegateMock |
| 22 : public DeviceManagementBackend::DeviceUnregisterResponseDelegate { |
| 23 public: |
| 24 MOCK_METHOD1(HandleUnregisterResponse, |
| 25 void(const em::DeviceUnregisterResponse&)); |
| 26 MOCK_METHOD1(OnError, void(DeviceManagementBackend::ErrorCode error)); |
| 27 }; |
| 28 |
| 29 class DevicePolicyResponseDelegateMock |
| 30 : public DeviceManagementBackend::DevicePolicyResponseDelegate { |
| 31 public: |
| 32 MOCK_METHOD1(HandlePolicyResponse, void(const em::DevicePolicyResponse&)); |
| 33 MOCK_METHOD1(OnError, void(DeviceManagementBackend::ErrorCode error)); |
| 34 }; |
| 35 |
| 36 } // namespace policy |
| 37 |
| 38 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_MOCK_H_ |
OLD | NEW |