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

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 3 years, 11 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 (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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 .Times(2); 246 .Times(2);
247 UserContext user_context(account_id_); 247 UserContext user_context(account_id_);
248 user_context.SetKey(Key(kPassword)); 248 user_context.SetKey(Key(kPassword));
249 user_context.SetUserIDHash(account_id_.GetUserEmail()); 249 user_context.SetUserIDHash(account_id_.GetUserEmail());
250 test::UserSessionManagerTestApi session_manager_test_api( 250 test::UserSessionManagerTestApi session_manager_test_api(
251 UserSessionManager::GetInstance()); 251 UserSessionManager::GetInstance());
252 session_manager_test_api.InjectStubUserContext(user_context); 252 session_manager_test_api.InjectStubUserContext(user_context);
253 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)) 253 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true))
254 .Times(1); 254 .Times(1);
255 EXPECT_CALL(*mock_login_display_host_, 255 EXPECT_CALL(*mock_login_display_host_,
256 StartWizard(WizardController::kTermsOfServiceScreenName)) 256 StartWizard(OobeScreen::SCREEN_TERMS_OF_SERVICE))
257 .Times(0); 257 .Times(0);
258 258
259 content::WindowedNotificationObserver profile_prepared_observer( 259 content::WindowedNotificationObserver profile_prepared_observer(
260 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 260 chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
261 content::NotificationService::AllSources()); 261 content::NotificationService::AllSources());
262 existing_user_controller()->Login(user_context, SigninSpecifics()); 262 existing_user_controller()->Login(user_context, SigninSpecifics());
263 263
264 profile_prepared_observer.Wait(); 264 profile_prepared_observer.Wait();
265 265
266 base::ThreadTaskRunnerHandle::Get()->PostTask( 266 base::ThreadTaskRunnerHandle::Get()->PostTask(
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 if (LoginDisplayHost::default_host()) 439 if (LoginDisplayHost::default_host())
440 LoginDisplayHost::default_host()->Finalize(); 440 LoginDisplayHost::default_host()->Finalize();
441 base::RunLoop().RunUntilIdle(); 441 base::RunLoop().RunUntilIdle();
442 } 442 }
443 443
444 void ExpectSuccessfulLogin(const UserContext& user_context) { 444 void ExpectSuccessfulLogin(const UserContext& user_context) {
445 test::UserSessionManagerTestApi session_manager_test_api( 445 test::UserSessionManagerTestApi session_manager_test_api(
446 UserSessionManager::GetInstance()); 446 UserSessionManager::GetInstance());
447 session_manager_test_api.InjectStubUserContext(user_context); 447 session_manager_test_api.InjectStubUserContext(user_context);
448 EXPECT_CALL(*mock_login_display_host_, 448 EXPECT_CALL(*mock_login_display_host_,
449 StartWizard(WizardController::kTermsOfServiceScreenName)) 449 StartWizard(OobeScreen::SCREEN_TERMS_OF_SERVICE))
450 .Times(0); 450 .Times(0);
451 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(AnyNumber()); 451 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(AnyNumber());
452 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(AnyNumber()); 452 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(AnyNumber());
453 } 453 }
454 454
455 void SetAutoLoginPolicy(const std::string& user_email, int delay) { 455 void SetAutoLoginPolicy(const std::string& user_email, int delay) {
456 // Wait until ExistingUserController has finished auto-login 456 // Wait until ExistingUserController has finished auto-login
457 // configuration by observing the same settings that trigger 457 // configuration by observing the same settings that trigger
458 // ConfigureAutoLogin. 458 // ConfigureAutoLogin.
459 459
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
758 PRE_TestLoadingPublicUsersFromLocalState) { 758 PRE_TestLoadingPublicUsersFromLocalState) {
759 // First run propagates public accounts and stores them in Local State. 759 // First run propagates public accounts and stores them in Local State.
760 } 760 }
761 761
762 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, 762 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest,
763 TestLoadingPublicUsersFromLocalState) { 763 TestLoadingPublicUsersFromLocalState) {
764 // Second run loads list of public accounts from Local State. 764 // Second run loads list of public accounts from Local State.
765 } 765 }
766 766
767 } // namespace chromeos 767 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/existing_user_controller.cc ('k') | chrome/browser/chromeos/login/hid_detection_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698