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

Unified Diff: chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc

Issue 2478173003: Lock profile before sign in when force sign in is enabled. (Closed)
Patch Set: rogerta's comments Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc
diff --git a/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc b/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc
index a8191be9fa4f2fd3d571abcb237af094610b65af..d8fb3755234a71aec82f5f5551f6d7cdf085a6f6 100644
--- a/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc
@@ -177,18 +177,19 @@ MockInlineSigninHelper::MockInlineSigninHelper(
const std::string& signin_scoped_device_id,
bool choose_what_to_sync,
bool confirm_untrusted_signin)
- : InlineSigninHelper(handler,
- getter,
- profile,
- current_url,
- email,
- gaia_id,
- password,
- session_index,
- auth_code,
- signin_scoped_device_id,
- choose_what_to_sync,
- confirm_untrusted_signin) {}
+ : InlineSigninHelper(handler,
+ getter,
+ profile,
+ Profile::CreateStatus::CREATE_STATUS_INITIALIZED,
+ current_url,
+ email,
+ gaia_id,
+ password,
+ session_index,
+ auth_code,
+ signin_scoped_device_id,
+ choose_what_to_sync,
+ confirm_untrusted_signin) {}
// This class is used to mock out virtual methods with side effects so that
// tests below can ensure they are called without causing side effects.
@@ -234,18 +235,19 @@ MockSyncStarterInlineSigninHelper::MockSyncStarterInlineSigninHelper(
const std::string& signin_scoped_device_id,
bool choose_what_to_sync,
bool confirm_untrusted_signin)
- : InlineSigninHelper(handler,
- getter,
- profile,
- current_url,
- email,
- gaia_id,
- password,
- session_index,
- auth_code,
- signin_scoped_device_id,
- choose_what_to_sync,
- confirm_untrusted_signin) {}
+ : InlineSigninHelper(handler,
+ getter,
+ profile,
+ Profile::CreateStatus::CREATE_STATUS_INITIALIZED,
+ current_url,
+ email,
+ gaia_id,
+ password,
+ session_index,
+ auth_code,
+ signin_scoped_device_id,
+ choose_what_to_sync,
+ confirm_untrusted_signin) {}
} // namespace
@@ -713,17 +715,14 @@ IN_PROC_BROWSER_TEST_F(InlineLoginHelperBrowserTest,
// possible values of access_point=, reason=.
GURL url("chrome://chrome-signin/?access_point=3&reason=2");
base::WeakPtr<InlineLoginHandlerImpl> handler;
- InlineSigninHelper helper(handler,
- browser()->profile()->GetRequestContext(),
+ InlineSigninHelper helper(handler, browser()->profile()->GetRequestContext(),
browser()->profile(),
- url,
- "foo@gmail.com",
- "gaiaid-12345",
- "password",
- "", // session index
+ Profile::CreateStatus::CREATE_STATUS_INITIALIZED,
+ url, "foo@gmail.com", "gaiaid-12345", "password",
+ "", // session index
"auth_code", // auth code
std::string(),
- false, // choose what to sync
+ false, // choose what to sync
false); // confirm untrusted signin
SimulateOnClientOAuthSuccess(&helper, "refresh_token");
ASSERT_EQ(1ul, token_service()->GetAccounts().size());
@@ -740,17 +739,14 @@ IN_PROC_BROWSER_TEST_F(InlineLoginHelperBrowserTest,
// possible values of access_point=, reason=.
GURL url("chrome://chrome-signin/?access_point=10&reason=1");
base::WeakPtr<InlineLoginHandlerImpl> handler;
- InlineSigninHelper helper(handler,
- browser()->profile()->GetRequestContext(),
+ InlineSigninHelper helper(handler, browser()->profile()->GetRequestContext(),
browser()->profile(),
- url,
- "foo@gmail.com",
- "gaiaid-12345",
- "password",
- "", // session index
+ Profile::CreateStatus::CREATE_STATUS_INITIALIZED,
+ url, "foo@gmail.com", "gaiaid-12345", "password",
+ "", // session index
"auth_code", // auth code
std::string(),
- false, // choose what to sync
+ false, // choose what to sync
false); // confirm untrusted signin
SimulateOnClientOAuthSuccess(&helper, "refresh_token");
ASSERT_EQ(1ul, token_service()->GetAccounts().size());
« no previous file with comments | « chrome/browser/ui/webui/signin/inline_login_handler_impl.cc ('k') | chrome/browser/ui/webui/signin/login_ui_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698