| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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_LOGIN_MANAGER_TEST_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "chrome/browser/chromeos/login/mixin_based_browser_test.h" | 10 #include "chrome/browser/chromeos/login/mixin_based_browser_test.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 // If no special configuration is done launches out-of-box WebUI. | 23 // If no special configuration is done launches out-of-box WebUI. |
| 24 // To launch login UI use PRE_* test that will register user(s) and mark | 24 // To launch login UI use PRE_* test that will register user(s) and mark |
| 25 // out-of-box as completed. | 25 // out-of-box as completed. |
| 26 // Guarantees that WebUI has been initialized by waiting for | 26 // Guarantees that WebUI has been initialized by waiting for |
| 27 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE notification. | 27 // NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE notification. |
| 28 class LoginManagerTest : public MixinBasedBrowserTest { | 28 class LoginManagerTest : public MixinBasedBrowserTest { |
| 29 public: | 29 public: |
| 30 explicit LoginManagerTest(bool should_launch_browser); | 30 explicit LoginManagerTest(bool should_launch_browser); |
| 31 | 31 |
| 32 // Overridden from InProcessBrowserTest. | 32 // Overridden from InProcessBrowserTest. |
| 33 virtual void TearDownOnMainThread() override; | 33 void TearDownOnMainThread() override; |
| 34 virtual void SetUpCommandLine(base::CommandLine* command_line) override; | 34 void SetUpCommandLine(base::CommandLine* command_line) override; |
| 35 virtual void SetUpInProcessBrowserTestFixture() override; | 35 void SetUpInProcessBrowserTestFixture() override; |
| 36 virtual void SetUpOnMainThread() override; | 36 void SetUpOnMainThread() override; |
| 37 | 37 |
| 38 // Registers the user with the given |user_id| on the device. | 38 // Registers the user with the given |user_id| on the device. |
| 39 // This method should be called in PRE_* test. | 39 // This method should be called in PRE_* test. |
| 40 // TODO(dzhioev): Add the ability to register users without a PRE_* test. | 40 // TODO(dzhioev): Add the ability to register users without a PRE_* test. |
| 41 void RegisterUser(const std::string& user_id); | 41 void RegisterUser(const std::string& user_id); |
| 42 | 42 |
| 43 // Set expected credentials for next login attempt. | 43 // Set expected credentials for next login attempt. |
| 44 void SetExpectedCredentials(const UserContext& user_context); | 44 void SetExpectedCredentials(const UserContext& user_context); |
| 45 | 45 |
| 46 // Tries to login with the credentials in |user_context|. The return value | 46 // Tries to login with the credentials in |user_context|. The return value |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 bool should_launch_browser_; | 80 bool should_launch_browser_; |
| 81 content::WebContents* web_contents_; | 81 content::WebContents* web_contents_; |
| 82 test::JSChecker js_checker_; | 82 test::JSChecker js_checker_; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(LoginManagerTest); | 84 DISALLOW_COPY_AND_ASSIGN(LoginManagerTest); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 } // namespace chromeos | 87 } // namespace chromeos |
| 88 | 88 |
| 89 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ | 89 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
| OLD | NEW |