Index: chrome/browser/chromeos/login/login_manager_test_helper.h |
diff --git a/chrome/browser/chromeos/login/login_manager_test.h b/chrome/browser/chromeos/login/login_manager_test_helper.h |
similarity index 60% |
rename from chrome/browser/chromeos/login/login_manager_test.h |
rename to chrome/browser/chromeos/login/login_manager_test_helper.h |
index b05db4860117f540bd8352dd53724d9c9200b554..0c4b819ae10340c1fc4004910847ef3d06b03002 100644 |
--- a/chrome/browser/chromeos/login/login_manager_test.h |
+++ b/chrome/browser/chromeos/login/login_manager_test_helper.h |
@@ -2,12 +2,11 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
-#define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
+#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_HELPER_H_ |
+#define CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_HELPER_H_ |
#include "chrome/browser/chromeos/login/mock_login_utils.h" |
#include "chrome/browser/chromeos/login/test/js_checker.h" |
-#include "chrome/test/base/in_process_browser_test.h" |
namespace content { |
class WebContents; |
@@ -15,21 +14,20 @@ class WebContents; |
namespace chromeos { |
-// Base class for Chrome OS out-of-box/login WebUI tests. |
+// Helper class for Chrome OS out-of-box/login WebUI tests. |
// If no special configuration is done launches out-of-box WebUI. |
// To launch login UI use PRE_* test that will register user(s) and mark |
// out-of-box as completed. |
-// Guarantees that WebUI has been initialized by waiting for |
-// NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE notification. |
-class LoginManagerTest : public InProcessBrowserTest { |
+class LoginManagerTestHelper { |
public: |
- explicit LoginManagerTest(bool should_launch_browser); |
+ LoginManagerTestHelper(); |
- // Overriden from InProcessBrowserTest. |
- virtual void CleanUpOnMainThread() OVERRIDE; |
- virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE; |
- virtual void SetUpInProcessBrowserTestFixture() OVERRIDE; |
- virtual void SetUpOnMainThread() OVERRIDE; |
+ // Sets up web contents. Guarantees that WebUI has been initialized by |
+ // waiting for NOTIFICATION_LOGIN_OR_LOCK_WEBUI_VISIBLE notification. |
+ void SetUp(); |
Nikita (slow)
2014/05/12 15:23:53
nit: Should this be named SetUpOnMainThread() to b
|
+ void SetUpCommandLine(CommandLine* command_line); |
+ void SetUpLoginUtils(bool should_launch_browser); |
+ void CleanUp(); |
Nikita (slow)
2014/05/12 15:23:53
nit: CleanUpOnMainThread()?
|
// Registers user with given |username| on device. |
// Should be called in PRE_* test. |
@@ -40,18 +38,19 @@ class LoginManagerTest : public InProcessBrowserTest { |
void SetExpectedCredentials(const std::string& username, |
const std::string& password); |
- // Tries to login with |username| and |password|. Returns false if attempt |
+ // Tries to log in with |username| and |password|. Returns false if attempt |
// has failed. |
- bool TryToLogin(const std::string& username, const std::string& password); |
+ bool TryToLogIn(const std::string& username, const std::string& password); |
// Tries to add user to session with |username| and |password|. Returns false |
// if attempt has failed. this function does the same as TryToLogin but |
// doesn't check that new user become active user. |
- bool AddUserTosession(const std::string& username, |
+ bool AddUserToSession(const std::string& username, |
const std::string& password); |
- // Login user with |username|. User should be registered using RegisterUser(). |
- void LoginUser(const std::string& username); |
+ // Log in user with |username|. User should be registered using |
+ // RegisterUser(). |
+ void LogInUser(const std::string& username); |
// Add user with |username| to session. |
void AddUser(const std::string& username); |
@@ -72,13 +71,12 @@ class LoginManagerTest : public InProcessBrowserTest { |
} |
MockLoginUtils* mock_login_utils_; |
- bool should_launch_browser_; |
content::WebContents* web_contents_; |
test::JSChecker js_checker_; |
- DISALLOW_COPY_AND_ASSIGN(LoginManagerTest); |
+ DISALLOW_COPY_AND_ASSIGN(LoginManagerTestHelper); |
}; |
} // namespace chromeos |
-#endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_ |
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_HELPER_H_ |