| Index: chrome/browser/policy/device_management_backend_mock.h
|
| diff --git a/chrome/browser/policy/device_management_backend_mock.h b/chrome/browser/policy/device_management_backend_mock.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..170fe3a945e144bdda2a54dd07bb35a9ca08d3b2
|
| --- /dev/null
|
| +++ b/chrome/browser/policy/device_management_backend_mock.h
|
| @@ -0,0 +1,38 @@
|
| +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_MOCK_H_
|
| +#define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_MOCK_H_
|
| +
|
| +#include "testing/gmock/include/gmock/gmock.h"
|
| +
|
| +namespace policy {
|
| +
|
| +// Mock classes for the various DeviceManagementBackend delegates that allow to
|
| +// capture callbacks using gmock.
|
| +class DeviceRegisterResponseDelegateMock
|
| + : public DeviceManagementBackend::DeviceRegisterResponseDelegate {
|
| + public:
|
| + MOCK_METHOD1(HandleRegisterResponse, void(const em::DeviceRegisterResponse&));
|
| + MOCK_METHOD1(OnError, void(DeviceManagementBackend::ErrorCode error));
|
| +};
|
| +
|
| +class DeviceUnregisterResponseDelegateMock
|
| + : public DeviceManagementBackend::DeviceUnregisterResponseDelegate {
|
| + public:
|
| + MOCK_METHOD1(HandleUnregisterResponse,
|
| + void(const em::DeviceUnregisterResponse&));
|
| + MOCK_METHOD1(OnError, void(DeviceManagementBackend::ErrorCode error));
|
| +};
|
| +
|
| +class DevicePolicyResponseDelegateMock
|
| + : public DeviceManagementBackend::DevicePolicyResponseDelegate {
|
| + public:
|
| + MOCK_METHOD1(HandlePolicyResponse, void(const em::DevicePolicyResponse&));
|
| + MOCK_METHOD1(OnError, void(DeviceManagementBackend::ErrorCode error));
|
| +};
|
| +
|
| +} // namespace policy
|
| +
|
| +#endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_MOCK_H_
|
|
|