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

Side by Side Diff: chrome/browser/ui/webui/signin/inline_login_ui_browsertest.cc

Issue 964563002: Replace SetAuthenticatedUsername with SetAuthenticatedAccountId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@priv
Patch Set: rebased Created 5 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/prefs/pref_service.h" 6 #include "base/prefs/pref_service.h"
7 #include "base/prefs/scoped_user_pref_update.h" 7 #include "base/prefs/scoped_user_pref_update.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/content_settings/cookie_settings.h" 9 #include "chrome/browser/content_settings/cookie_settings.h"
10 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 protected: 130 protected:
131 content::WebContents* web_contents() { return nullptr; } 131 content::WebContents* web_contents() { return nullptr; }
132 }; 132 };
133 133
134 void InlineLoginUIBrowserTest::SetUpSigninManager(const std::string& username) { 134 void InlineLoginUIBrowserTest::SetUpSigninManager(const std::string& username) {
135 if (username.empty()) 135 if (username.empty())
136 return; 136 return;
137 137
138 SigninManagerBase* signin_manager = 138 SigninManagerBase* signin_manager =
139 SigninManagerFactory::GetForProfile(browser()->profile()); 139 SigninManagerFactory::GetForProfile(browser()->profile());
140 signin_manager->SetAuthenticatedUsername(username); 140 signin_manager->SetAuthenticatedAccountInfo(username, username);
141 } 141 }
142 142
143 void InlineLoginUIBrowserTest::EnableSigninAllowed(bool enable) { 143 void InlineLoginUIBrowserTest::EnableSigninAllowed(bool enable) {
144 PrefService* pref_service = browser()->profile()->GetPrefs(); 144 PrefService* pref_service = browser()->profile()->GetPrefs();
145 pref_service->SetBoolean(prefs::kSigninAllowed, enable); 145 pref_service->SetBoolean(prefs::kSigninAllowed, enable);
146 } 146 }
147 147
148 void InlineLoginUIBrowserTest::EnableOneClick(bool enable) { 148 void InlineLoginUIBrowserTest::EnableOneClick(bool enable) {
149 PrefService* pref_service = browser()->profile()->GetPrefs(); 149 PrefService* pref_service = browser()->profile()->GetPrefs();
150 pref_service->SetBoolean(prefs::kReverseAutologinEnabled, enable); 150 pref_service->SetBoolean(prefs::kReverseAutologinEnabled, enable);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 ->AddObserver(&observer); 466 ->AddObserver(&observer);
467 base::RunLoop run_loop; 467 base::RunLoop run_loop;
468 EXPECT_CALL(observer, OnUntrustedLoginUIShown()) 468 EXPECT_CALL(observer, OnUntrustedLoginUIShown())
469 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit)); 469 .WillOnce(InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
470 470
471 ExecuteJsToSigninInSigninFrame(browser(), "email@gmail.com", "password"); 471 ExecuteJsToSigninInSigninFrame(browser(), "email@gmail.com", "password");
472 run_loop.Run(); 472 run_loop.Run();
473 base::MessageLoop::current()->RunUntilIdle(); 473 base::MessageLoop::current()->RunUntilIdle();
474 } 474 }
475 #endif // OS_CHROMEOS 475 #endif // OS_CHROMEOS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698