Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/policy/mock_device_management_service.h

Issue 9109009: Introduce CloudPolicyClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 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_MOCK_DEVICE_MANAGEMENT_SERVICE_H_ 5 #ifndef CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_SERVICE_H_
6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_SERVICE_H_ 6 #define CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "chrome/browser/policy/device_management_service.h" 10 #include "chrome/browser/policy/device_management_service.h"
11 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
12 12
13 namespace policy { 13 namespace policy {
14 14
15 class MockDeviceManagementService;
Joao da Silva 2012/05/22 20:59:30 Not needed?
Mattias Nissler (ping if slow) 2012/05/24 10:12:01 Indeed. Not sure how it ended up here :)
16
15 class MockDeviceManagementService : public DeviceManagementService { 17 class MockDeviceManagementService : public DeviceManagementService {
16 public: 18 public:
17 MockDeviceManagementService(); 19 MockDeviceManagementService();
18 virtual ~MockDeviceManagementService(); 20 virtual ~MockDeviceManagementService();
19 21
20 typedef DeviceManagementRequestJob* CreateJobFunction( 22 typedef DeviceManagementRequestJob* CreateJobFunction(
21 DeviceManagementRequestJob::JobType); 23 DeviceManagementRequestJob::JobType);
22 24
23 MOCK_METHOD1(CreateJob, CreateJobFunction); 25 MOCK_METHOD1(CreateJob, CreateJobFunction);
24 MOCK_METHOD1(StartJob, void(DeviceManagementRequestJob*)); 26 MOCK_METHOD7(
27 StartJob,
28 void(const std::string& request_type,
29 const std::string& gaia_token,
30 const std::string& oauth_token,
31 const std::string& dm_token,
32 const std::string& user_affiliation,
33 const std::string& client_id,
Joao da Silva 2012/05/22 20:59:30 #include <string>
Mattias Nissler (ping if slow) 2012/05/24 10:12:01 Done.
34 const enterprise_management::DeviceManagementRequest& request));
25 35
26 // Creates a gmock action that will make the job succeed. 36 // Creates a gmock action that will make the job succeed.
27 testing::Action<CreateJobFunction> SucceedJob( 37 testing::Action<CreateJobFunction> SucceedJob(
28 const enterprise_management::DeviceManagementResponse& response); 38 const enterprise_management::DeviceManagementResponse& response);
29 // Creates a gmock action which will fail the job with the given error. 39 // Creates a gmock action which will fail the job with the given error.
30 testing::Action<CreateJobFunction> FailJob(DeviceManagementStatus status); 40 testing::Action<CreateJobFunction> FailJob(DeviceManagementStatus status);
31 41
32 private: 42 private:
33 DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementService); 43 DISALLOW_COPY_AND_ASSIGN(MockDeviceManagementService);
34 }; 44 };
35 45
36 } // namespace policy 46 } // namespace policy
37 47
38 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_SERVICE_H_ 48 #endif // CHROME_BROWSER_POLICY_MOCK_DEVICE_MANAGEMENT_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698