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_AUTHENTICATOR_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 const std::string& login_token, | 65 const std::string& login_token, |
66 const std::string& login_captcha) OVERRIDE {} | 66 const std::string& login_captcha) OVERRIDE {} |
67 | 67 |
68 private: | 68 private: |
69 std::string expected_username_; | 69 std::string expected_username_; |
70 std::string expected_password_; | 70 std::string expected_password_; |
71 | 71 |
72 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); | 72 DISALLOW_COPY_AND_ASSIGN(MockAuthenticator); |
73 }; | 73 }; |
74 | 74 |
75 class MockLoginUtils : public LoginUtils { | 75 class TestLoginUtils : public LoginUtils { |
76 public: | 76 public: |
77 MockLoginUtils(const std::string& expected_username, | 77 TestLoginUtils(const std::string& expected_username, |
78 const std::string& expected_password); | 78 const std::string& expected_password); |
79 virtual ~MockLoginUtils(); | 79 virtual ~TestLoginUtils(); |
80 | 80 |
| 81 virtual void DoBrowserLaunch(Profile* profile, |
| 82 LoginDisplayHost* login_host) OVERRIDE {} |
81 virtual void PrepareProfile(const std::string& username, | 83 virtual void PrepareProfile(const std::string& username, |
82 const std::string& display_email, | 84 const std::string& display_email, |
83 const std::string& password, | 85 const std::string& password, |
84 bool pending_requests, | 86 bool pending_requests, |
85 bool using_oauth, | 87 bool using_oauth, |
86 bool has_cookies, | 88 bool has_cookies, |
87 Delegate* delegate) OVERRIDE; | 89 Delegate* delegate) OVERRIDE; |
88 | 90 |
89 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE; | 91 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE; |
90 | 92 |
(...skipping 25 matching lines...) Expand all Loading... |
116 virtual void TransferDefaultAuthCache(Profile* default_profile, | 118 virtual void TransferDefaultAuthCache(Profile* default_profile, |
117 Profile* new_profile) OVERRIDE; | 119 Profile* new_profile) OVERRIDE; |
118 | 120 |
119 virtual void StopBackgroundFetchers() OVERRIDE; | 121 virtual void StopBackgroundFetchers() OVERRIDE; |
120 | 122 |
121 private: | 123 private: |
122 std::string expected_username_; | 124 std::string expected_username_; |
123 std::string expected_password_; | 125 std::string expected_password_; |
124 std::string auth_token_; | 126 std::string auth_token_; |
125 | 127 |
126 DISALLOW_COPY_AND_ASSIGN(MockLoginUtils); | 128 DISALLOW_COPY_AND_ASSIGN(TestLoginUtils); |
127 }; | 129 }; |
128 | 130 |
129 } // namespace chromeos | 131 } // namespace chromeos |
130 | 132 |
131 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ | 133 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_AUTHENTICATOR_H_ |
OLD | NEW |