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

Side by Side Diff: chrome/browser/ui/webui/signin/login_ui_test_utils.h

Issue 1433613002: Customize login test utils to wait for cookies to be set. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit: docs Created 5 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/login_ui_test_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_UI_WEBUI_SIGNIN_LOGIN_UI_TEST_UTILS_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_TEST_UTILS_H_
6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_TEST_UTILS_H_ 6 #define CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_TEST_UTILS_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/signin/core/browser/signin_metrics.h"
11
10 class Browser; 12 class Browser;
11 13
12 namespace login_ui_test_utils { 14 namespace login_ui_test_utils {
13 15
14 // Blocks until the login UI is available and ready for authorization. 16 // Blocks until the login UI is available and ready for authorization.
15 void WaitUntilUIReady(Browser* browser); 17 void WaitUntilUIReady(Browser* browser);
16 18
17 // Blocks until an element with id |element_id| exists in the signin page. 19 // Blocks until an element with id |element_id| exists in the signin page.
18 void WaitUntilElementExistsInSigninFrame(Browser* browser, 20 void WaitUntilElementExistsInSigninFrame(Browser* browser,
19 const std::string& element_id); 21 const std::string& element_id);
(...skipping 14 matching lines...) Expand all
34 const std::string& email, 36 const std::string& email,
35 const std::string& password); 37 const std::string& password);
36 38
37 // Executes JS to sign in the user in the old GAIA sign in flow. 39 // Executes JS to sign in the user in the old GAIA sign in flow.
38 void SigninInOldGaiaFlow(Browser* browser, 40 void SigninInOldGaiaFlow(Browser* browser,
39 const std::string& email, 41 const std::string& email,
40 const std::string& password); 42 const std::string& password);
41 43
42 // A function to sign in a user using Chrome sign-in UI interface. 44 // A function to sign in a user using Chrome sign-in UI interface.
43 // This will block until a signin succeeded or failed notification is observed. 45 // This will block until a signin succeeded or failed notification is observed.
46 // In case |wait_for_account_cookies|, the call will block until the account
47 // cookies have been written to the cookie jar.
48 // |signin_source| identifies the source used to load the signin page.
49 bool SignInWithUI(Browser* browser,
50 const std::string& email,
51 const std::string& password,
52 bool wait_for_account_cookies,
53 signin_metrics::Source signin_source);
54
55 // Most common way to sign in a user, it does not wait for cookies to be set
56 // and uses the SOURCE_START_PAGE as signin source.
44 bool SignInWithUI(Browser* browser, 57 bool SignInWithUI(Browser* browser,
45 const std::string& email, 58 const std::string& email,
46 const std::string& password); 59 const std::string& password);
47 60
48 } // namespace login_ui_test_utils 61 } // namespace login_ui_test_utils
49 62
50 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_TEST_UTILS_H_ 63 #endif // CHROME_BROWSER_UI_WEBUI_SIGNIN_LOGIN_UI_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/webui/signin/login_ui_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698