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

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

Issue 22887021: Pass focus to browser after login. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 4 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
(Empty)
1 // Copyright 2013 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_LOGIN_MANAGER_TEST_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_
7
8 #include "chrome/browser/chromeos/login/mock_login_utils.h"
9 #include "chrome/test/base/in_process_browser_test.h"
10
11 namespace chromeos {
12
13 class LoginManagerTest : public InProcessBrowserTest {
14 public:
15 explicit LoginManagerTest(bool should_launch_browser);
16
17 // Overriden from InProcessBrowserTest.
18 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
19 virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
20
21 // Registers user with given |username| on device.
22 // Should be called in PRE_* test.
23 // TODO(dzhioev): add ability to register users without PRE_* test.
24 void RegisterUser(const std::string& username);
25
26 // Set expected credentials for next login attempt.
27 void SetExpectedCredentials(const std::string& username,
28 const std::string& password);
29
30 // Tries to login with |username| and |password|. Returns false if attempt
31 // has failed.
32 bool TryToLogin(const std::string& username, const std::string& password);
33
34 // Login user with |username|. User should be registered using RegisterUser().
35 void LoginUser(const std::string& username);
36
37 MockLoginUtils& login_utils() { return *mock_login_utils_; }
38
39 private:
40 MockLoginUtils* mock_login_utils_;
41 bool should_launch_browser_;
42
43 DISALLOW_COPY_AND_ASSIGN(LoginManagerTest);
44 };
45
46 } // namespace chromeos
47
48 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/fake_login_utils.cc ('k') | chrome/browser/chromeos/login/login_manager_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698