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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc

Issue 2566443005: cros: Replace WizardController string constants with OobeScreen values. (Closed)
Patch Set: Address comments Created 4 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 .Times(2); 245 .Times(2);
246 UserContext user_context(account_id_); 246 UserContext user_context(account_id_);
247 user_context.SetKey(Key(kPassword)); 247 user_context.SetKey(Key(kPassword));
248 user_context.SetUserIDHash(account_id_.GetUserEmail()); 248 user_context.SetUserIDHash(account_id_.GetUserEmail());
249 test::UserSessionManagerTestApi session_manager_test_api( 249 test::UserSessionManagerTestApi session_manager_test_api(
250 UserSessionManager::GetInstance()); 250 UserSessionManager::GetInstance());
251 session_manager_test_api.InjectStubUserContext(user_context); 251 session_manager_test_api.InjectStubUserContext(user_context);
252 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) 252 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true))
253 .Times(1); 253 .Times(1);
254 EXPECT_CALL(*mock_login_display_host_, 254 EXPECT_CALL(*mock_login_display_host_,
255 StartWizard(WizardController::kTermsOfServiceScreenName)) 255 StartWizard(OobeScreen::SCREEN_TERMS_OF_SERVICE))
256 .Times(0); 256 .Times(0);
257 257
258 content::WindowedNotificationObserver profile_prepared_observer( 258 content::WindowedNotificationObserver profile_prepared_observer(
259 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 259 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
260 content::NotificationService::AllSources()); 260 content::NotificationService::AllSources());
261 existing_user_controller()->Login(user_context, SigninSpecifics()); 261 existing_user_controller()->Login(user_context, SigninSpecifics());
262 262
263 profile_prepared_observer.Wait(); 263 profile_prepared_observer.Wait();
264 264
265 base::ThreadTaskRunnerHandle::Get()->PostTask( 265 base::ThreadTaskRunnerHandle::Get()->PostTask(
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 if (LoginDisplayHost::default_host()) 438 if (LoginDisplayHost::default_host())
439 LoginDisplayHost::default_host()->Finalize(); 439 LoginDisplayHost::default_host()->Finalize();
440 base::RunLoop().RunUntilIdle(); 440 base::RunLoop().RunUntilIdle();
441 } 441 }
442 442
443 void ExpectSuccessfulLogin(const UserContext& user_context) { 443 void ExpectSuccessfulLogin(const UserContext& user_context) {
444 test::UserSessionManagerTestApi session_manager_test_api( 444 test::UserSessionManagerTestApi session_manager_test_api(
445 UserSessionManager::GetInstance()); 445 UserSessionManager::GetInstance());
446 session_manager_test_api.InjectStubUserContext(user_context); 446 session_manager_test_api.InjectStubUserContext(user_context);
447 EXPECT_CALL(*mock_login_display_host_, 447 EXPECT_CALL(*mock_login_display_host_,
448 StartWizard(WizardController::kTermsOfServiceScreenName)) 448 StartWizard(OobeScreen::SCREEN_TERMS_OF_SERVICE))
449 .Times(0); 449 .Times(0);
450 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(AnyNumber()); 450 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(AnyNumber());
451 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(AnyNumber()); 451 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(AnyNumber());
452 } 452 }
453 453
454 void SetAutoLoginPolicy(const std::string& user_email, int delay) { 454 void SetAutoLoginPolicy(const std::string& user_email, int delay) {
455 // Wait until ExistingUserController has finished auto-login 455 // Wait until ExistingUserController has finished auto-login
456 // configuration by observing the same settings that trigger 456 // configuration by observing the same settings that trigger
457 // ConfigureAutoLogin. 457 // ConfigureAutoLogin.
458 458
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 PRE_TestLoadingPublicUsersFromLocalState) { 757 PRE_TestLoadingPublicUsersFromLocalState) {
758 // First run propagates public accounts and stores them in Local State. 758 // First run propagates public accounts and stores them in Local State.
759 } 759 }
760 760
761 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, 761 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest,
762 TestLoadingPublicUsersFromLocalState) { 762 TestLoadingPublicUsersFromLocalState) {
763 // Second run loads list of public accounts from Local State. 763 // Second run loads list of public accounts from Local State.
764 } 764 }
765 765
766 } // namespace chromeos 766 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698