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

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..e88634f155a1d961fb726406d3e259ff11349054
--- /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/login/mock_login_utils.h"
+#include "chrome/test/base/in_process_browser_test.h"
+
+namespace chromeos {
+
+class LoginManagerTest : public InProcessBrowserTest {
+ public:
+ explicit LoginManagerTest(bool should_launch_browser);
+
+ // Overriden from InProcessBrowserTest.
+ 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_
« 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