| OLD | NEW |
| 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 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 433 | 433 |
| 434 // Test case may be configured with the real user manager but empty user | 434 // Test case may be configured with the real user manager but empty user |
| 435 // list initially. So network OOBE screen is initialized. | 435 // list initially. So network OOBE screen is initialized. |
| 436 // Need to reset it manually so that we don't end up with CrosSettings | 436 // Need to reset it manually so that we don't end up with CrosSettings |
| 437 // observer that wasn't removed. | 437 // observer that wasn't removed. |
| 438 WizardController* controller = WizardController::default_controller(); | 438 WizardController* controller = WizardController::default_controller(); |
| 439 if (controller && controller->current_screen()) | 439 if (controller && controller->current_screen()) |
| 440 controller->current_screen()->Hide(); | 440 controller->current_screen()->Hide(); |
| 441 | 441 |
| 442 if (LoginDisplayHost::default_host()) | 442 if (LoginDisplayHost::default_host()) |
| 443 LoginDisplayHost::default_host()->Finalize(); | 443 LoginDisplayHost::default_host()->Finalize(base::OnceClosure()); |
| 444 base::RunLoop().RunUntilIdle(); | 444 base::RunLoop().RunUntilIdle(); |
| 445 } | 445 } |
| 446 | 446 |
| 447 void ExpectSuccessfulLogin(const UserContext& user_context) { | 447 void ExpectSuccessfulLogin(const UserContext& user_context) { |
| 448 test::UserSessionManagerTestApi session_manager_test_api( | 448 test::UserSessionManagerTestApi session_manager_test_api( |
| 449 UserSessionManager::GetInstance()); | 449 UserSessionManager::GetInstance()); |
| 450 session_manager_test_api.InjectStubUserContext(user_context); | 450 session_manager_test_api.InjectStubUserContext(user_context); |
| 451 EXPECT_CALL(*mock_login_display_host_, | 451 EXPECT_CALL(*mock_login_display_host_, |
| 452 StartWizard(OobeScreen::SCREEN_TERMS_OF_SERVICE)) | 452 StartWizard(OobeScreen::SCREEN_TERMS_OF_SERVICE)) |
| 453 .Times(0); | 453 .Times(0); |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 GAIAAccountLogin_Failure) { | 838 GAIAAccountLogin_Failure) { |
| 839 ExpectLoginFailure(); | 839 ExpectLoginFailure(); |
| 840 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); | 840 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); |
| 841 UserContext user_context(gaia_account_id_); | 841 UserContext user_context(gaia_account_id_); |
| 842 user_context.SetKey(Key(kPassword)); | 842 user_context.SetKey(Key(kPassword)); |
| 843 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); | 843 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); |
| 844 existing_user_controller()->CompleteLogin(user_context); | 844 existing_user_controller()->CompleteLogin(user_context); |
| 845 } | 845 } |
| 846 | 846 |
| 847 } // namespace chromeos | 847 } // namespace chromeos |
| OLD | NEW |