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

Side by Side Diff: chrome/browser/chromeos/login/test_login_utils.h

Issue 296773002: Add a Key class (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 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_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_
7 7
8 #include <string>
9
10 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
11 #include "chrome/browser/chromeos/login/auth/authenticator.h" 9 #include "chrome/browser/chromeos/login/auth/authenticator.h"
10 #include "chrome/browser/chromeos/login/auth/user_context.h"
12 #include "chrome/browser/chromeos/login/login_utils.h" 11 #include "chrome/browser/chromeos/login/login_utils.h"
13 #include "google_apis/gaia/google_service_auth_error.h" 12 #include "google_apis/gaia/google_service_auth_error.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 14
16 class Profile; 15 class Profile;
17 16
18 namespace chromeos { 17 namespace chromeos {
19 18
20 class LoginStatusConsumer; 19 class LoginStatusConsumer;
21 20
22 class TestLoginUtils : public LoginUtils { 21 class TestLoginUtils : public LoginUtils {
23 public: 22 public:
24 TestLoginUtils(const std::string& expected_username, 23 explicit TestLoginUtils(const UserContext& user_context);
25 const std::string& expected_password);
26 virtual ~TestLoginUtils(); 24 virtual ~TestLoginUtils();
27 25
26 // LoginUtils:
28 virtual void DoBrowserLaunch(Profile* profile, 27 virtual void DoBrowserLaunch(Profile* profile,
29 LoginDisplayHost* login_host) OVERRIDE {} 28 LoginDisplayHost* login_host) OVERRIDE {}
30 virtual void PrepareProfile(const UserContext& credentials, 29 virtual void PrepareProfile(const UserContext& user_context,
31 const std::string& display_email, 30 const std::string& display_email,
32 bool has_cookies, 31 bool has_cookies,
33 bool has_active_session, 32 bool has_active_session,
34 Delegate* delegate) OVERRIDE; 33 Delegate* delegate) OVERRIDE;
35
36 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE; 34 virtual void DelegateDeleted(Delegate* delegate) OVERRIDE;
37
38 virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE {} 35 virtual void CompleteOffTheRecordLogin(const GURL& start_url) OVERRIDE {}
39
40 virtual void SetFirstLoginPrefs(PrefService* prefs) OVERRIDE {} 36 virtual void SetFirstLoginPrefs(PrefService* prefs) OVERRIDE {}
41
42 virtual scoped_refptr<Authenticator> CreateAuthenticator( 37 virtual scoped_refptr<Authenticator> CreateAuthenticator(
43 LoginStatusConsumer* consumer) OVERRIDE; 38 LoginStatusConsumer* consumer) OVERRIDE;
44
45 virtual void RestoreAuthenticationSession(Profile* profile) OVERRIDE {} 39 virtual void RestoreAuthenticationSession(Profile* profile) OVERRIDE {}
46
47 virtual void InitRlzDelayed(Profile* user_profile) OVERRIDE; 40 virtual void InitRlzDelayed(Profile* user_profile) OVERRIDE;
48 41
49 private: 42 private:
50 std::string expected_username_; 43 UserContext expected_user_context_;
51 std::string expected_password_;
52 std::string auth_token_;
53 44
54 DISALLOW_COPY_AND_ASSIGN(TestLoginUtils); 45 DISALLOW_COPY_AND_ASSIGN(TestLoginUtils);
55 }; 46 };
56 47
57 } // namespace chromeos 48 } // namespace chromeos
58 49
59 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_ 50 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_TEST_LOGIN_UTILS_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/signin/oauth2_browsertest.cc ('k') | chrome/browser/chromeos/login/test_login_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698