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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/login_manager_test.h
diff --git a/chrome/browser/chromeos/login/login_manager_test.h b/chrome/browser/chromeos/login/login_manager_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..fb8bd05fe03a5f060ae6c8e061cfa4d704b9b4ed
--- /dev/null
+++ b/chrome/browser/chromeos/login/login_manager_test.h
@@ -0,0 +1,48 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// 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_
+
+#include "chrome/browser/chromeos/cros/cros_in_process_browser_test.h"
+#include "chrome/browser/chromeos/login/mock_login_utils.h"
+
+namespace chromeos {
+
+class LoginManagerTest : public CrosInProcessBrowserTest {
Nikita (slow) 2013/08/19 13:26:06 nit: Please add comment that describes what this t
+ public:
+ explicit LoginManagerTest(bool should_launch_browser);
+
+ // Overriden from CrosInProcessBrowserTest.
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE;
+ virtual void SetUpInProcessBrowserTestFixture() OVERRIDE;
+
+ // Registers user with given |username| on device.
+ // Should be called in PRE_* test.
+ // TODO(dzhioev): add ability to register users without PRE_* test.
+ void RegisterUser(const std::string& username);
+
+ // Set expected credentials for next login attempt.
+ void SetExpectedCredentials(const std::string& username,
+ const std::string& password);
+
+ // Tries to login with |username| and |password|. Returns false if attempt
+ // has failed.
+ bool TryToLogin(const std::string& username, const std::string& password);
+
+ // Login user with |username|. User should be registered using RegisterUser().
+ void LoginUser(const std::string& username);
+
+ MockLoginUtils& login_utils() { return *mock_login_utils_; }
+
+ private:
+ MockLoginUtils* mock_login_utils_;
+ bool should_launch_browser_;
+
+ DISALLOW_COPY_AND_ASSIGN(LoginManagerTest);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_LOGIN_LOGIN_MANAGER_TEST_H_

Powered by Google App Engine
This is Rietveld 408576698