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_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ | |
7 | |
8 #include "base/basictypes.h" | |
9 #include "chrome/browser/chromeos/login/signed_settings_helper.h" | |
10 #include "testing/gmock/include/gmock/gmock.h" | |
11 | |
12 namespace chromeos { | |
13 | |
14 class MockSignedSettingsHelper : public chromeos::SignedSettingsHelper { | |
15 public: | |
16 MockSignedSettingsHelper(); | |
17 virtual ~MockSignedSettingsHelper(); | |
18 | |
19 MOCK_METHOD2(StartStorePolicyOp, | |
20 void(const enterprise_management::PolicyFetchResponse&, | |
21 SignedSettingsHelper::StorePolicyCallback)); | |
22 MOCK_METHOD1(StartRetrievePolicyOp, | |
23 void(SignedSettingsHelper::RetrievePolicyCallback)); | |
24 | |
25 private: | |
26 DISALLOW_COPY_AND_ASSIGN(MockSignedSettingsHelper); | |
27 }; | |
28 | |
29 ACTION_P(MockSignedSettingsHelperStorePolicy, status_code) { | |
30 arg1.Run(status_code); | |
31 } | |
32 | |
33 ACTION_P2(MockSignedSettingsHelperRetrievePolicy, status_code, policy) { | |
34 arg0.Run(status_code, policy); | |
35 } | |
36 | |
37 } // namespace chromeos | |
38 | |
39 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_SIGNED_SETTINGS_HELPER_H_ | |
OLD | NEW |