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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 void TearDownOnMainThread() override { | 408 void TearDownOnMainThread() override { |
409 ExistingUserControllerTest::TearDownOnMainThread(); | 409 ExistingUserControllerTest::TearDownOnMainThread(); |
410 | 410 |
411 // Test case may be configured with the real user manager but empty user | 411 // Test case may be configured with the real user manager but empty user |
412 // list initially. So network OOBE screen is initialized. | 412 // list initially. So network OOBE screen is initialized. |
413 // Need to reset it manually so that we don't end up with CrosSettings | 413 // Need to reset it manually so that we don't end up with CrosSettings |
414 // observer that wasn't removed. | 414 // observer that wasn't removed. |
415 WizardController* controller = WizardController::default_controller(); | 415 WizardController* controller = WizardController::default_controller(); |
416 if (controller && controller->current_screen()) | 416 if (controller && controller->current_screen()) |
417 controller->current_screen()->Hide(); | 417 controller->current_screen()->Hide(); |
| 418 |
| 419 if (LoginDisplayHost::default_host()) |
| 420 LoginDisplayHost::default_host()->Finalize(); |
| 421 base::MessageLoop::current()->RunUntilIdle(); |
418 } | 422 } |
419 | 423 |
420 void ExpectSuccessfulLogin(const UserContext& user_context) { | 424 void ExpectSuccessfulLogin(const UserContext& user_context) { |
421 test::UserSessionManagerTestApi session_manager_test_api( | 425 test::UserSessionManagerTestApi session_manager_test_api( |
422 UserSessionManager::GetInstance()); | 426 UserSessionManager::GetInstance()); |
423 session_manager_test_api.InjectStubUserContext(user_context); | 427 session_manager_test_api.InjectStubUserContext(user_context); |
424 EXPECT_CALL(*mock_login_display_host_, | 428 EXPECT_CALL(*mock_login_display_host_, |
425 StartWizard(WizardController::kTermsOfServiceScreenName)) | 429 StartWizard(WizardController::kTermsOfServiceScreenName)) |
426 .Times(0); | 430 .Times(0); |
427 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(AnyNumber()); | 431 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(AnyNumber()); |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
728 PRE_TestLoadingPublicUsersFromLocalState) { | 732 PRE_TestLoadingPublicUsersFromLocalState) { |
729 // First run propagates public accounts and stores them in Local State. | 733 // First run propagates public accounts and stores them in Local State. |
730 } | 734 } |
731 | 735 |
732 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, | 736 IN_PROC_BROWSER_TEST_F(ExistingUserControllerPublicSessionTest, |
733 TestLoadingPublicUsersFromLocalState) { | 737 TestLoadingPublicUsersFromLocalState) { |
734 // Second run loads list of public accounts from Local State. | 738 // Second run loads list of public accounts from Local State. |
735 } | 739 } |
736 | 740 |
737 } // namespace chromeos | 741 } // namespace chromeos |
OLD | NEW |