OLD | NEW |
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_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "chrome/browser/chromeos/login/authenticator.h" | 12 #include "chrome/browser/chromeos/login/authenticator.h" |
13 #include "chrome/browser/chromeos/login/login_display_host.h" | 13 #include "chrome/browser/chromeos/login/login_display_host.h" |
14 #include "chrome/browser/chromeos/login/login_utils.h" | 14 #include "chrome/browser/chromeos/login/login_utils.h" |
15 #include "google_apis/gaia/gaia_auth_consumer.h" | 15 #include "google_apis/gaia/gaia_auth_consumer.h" |
16 #include "googleurl/src/gurl.h" | 16 #include "googleurl/src/gurl.h" |
17 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
18 | 18 |
19 class PrefService; | 19 class PrefService; |
20 class Profile; | 20 class Profile; |
21 | 21 |
22 namespace chromeos { | 22 namespace chromeos { |
23 | 23 |
24 class LoginStatusConsumer; | 24 class LoginStatusConsumer; |
| 25 struct UserCredentials; |
25 | 26 |
26 class MockLoginUtils : public LoginUtils { | 27 class MockLoginUtils : public LoginUtils { |
27 public: | 28 public: |
28 MockLoginUtils(); | 29 MockLoginUtils(); |
29 virtual ~MockLoginUtils(); | 30 virtual ~MockLoginUtils(); |
30 | 31 |
31 MOCK_METHOD2(DoBrowserLaunch, void(Profile*, LoginDisplayHost*)); | 32 MOCK_METHOD2(DoBrowserLaunch, void(Profile*, LoginDisplayHost*)); |
32 MOCK_METHOD6(PrepareProfile, | 33 MOCK_METHOD5(PrepareProfile, |
33 void(const std::string&, const std::string&, const std::string&, | 34 void(const UserCredentials&, const std::string&, |
34 bool, bool, LoginUtils::Delegate*)); | 35 bool, bool, LoginUtils::Delegate*)); |
35 MOCK_METHOD1(DelegateDeleted, void(LoginUtils::Delegate*)); | 36 MOCK_METHOD1(DelegateDeleted, void(LoginUtils::Delegate*)); |
36 MOCK_METHOD1(CompleteOffTheRecordLogin, void(const GURL&)); | 37 MOCK_METHOD1(CompleteOffTheRecordLogin, void(const GURL&)); |
37 MOCK_METHOD1(SetFirstLoginPrefs, void(PrefService*)); | 38 MOCK_METHOD1(SetFirstLoginPrefs, void(PrefService*)); |
38 MOCK_METHOD1(CreateAuthenticator, | 39 MOCK_METHOD1(CreateAuthenticator, |
39 scoped_refptr<Authenticator>(LoginStatusConsumer*)); | 40 scoped_refptr<Authenticator>(LoginStatusConsumer*)); |
40 MOCK_METHOD0(PrewarmAuthentication, void(void)); | 41 MOCK_METHOD0(PrewarmAuthentication, void(void)); |
41 MOCK_METHOD1(RestoreAuthenticationSession, void(Profile*)); | 42 MOCK_METHOD1(RestoreAuthenticationSession, void(Profile*)); |
42 MOCK_METHOD1(StartTokenServices, void(Profile*)); | 43 MOCK_METHOD1(StartTokenServices, void(Profile*)); |
43 MOCK_METHOD2(TransferDefaultCookiesAndServerBoundCerts, | 44 MOCK_METHOD2(TransferDefaultCookiesAndServerBoundCerts, |
44 void(Profile*, Profile*)); | 45 void(Profile*, Profile*)); |
45 MOCK_METHOD2(TransferDefaultAuthCache, void(Profile*, Profile*)); | 46 MOCK_METHOD2(TransferDefaultAuthCache, void(Profile*, Profile*)); |
46 MOCK_METHOD0(StopBackgroundFetchers, void(void)); | 47 MOCK_METHOD0(StopBackgroundFetchers, void(void)); |
47 MOCK_METHOD1(InitRlzDelayed, void(Profile*)); | 48 MOCK_METHOD1(InitRlzDelayed, void(Profile*)); |
48 }; | 49 }; |
49 | 50 |
50 } // namespace chromeos | 51 } // namespace chromeos |
51 | 52 |
52 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ | 53 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_LOGIN_UTILS_H_ |
OLD | NEW |