| 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 777 policy::DevicePolicyCrosTestHelper::MarkAsActiveDirectoryEnterpriseOwned( | 777 policy::DevicePolicyCrosTestHelper::MarkAsActiveDirectoryEnterpriseOwned( |
| 778 kActiveDirectoryRealm); | 778 kActiveDirectoryRealm); |
| 779 } | 779 } |
| 780 | 780 |
| 781 // Overriden from ExistingUserControllerTest: | 781 // Overriden from ExistingUserControllerTest: |
| 782 void SetUpInProcessBrowserTestFixture() override { | 782 void SetUpInProcessBrowserTestFixture() override { |
| 783 RefreshDevicePolicy(); | 783 RefreshDevicePolicy(); |
| 784 ExistingUserControllerTest::SetUpInProcessBrowserTestFixture(); | 784 ExistingUserControllerTest::SetUpInProcessBrowserTestFixture(); |
| 785 } | 785 } |
| 786 | 786 |
| 787 void TearDownOnMainThread() override { |
| 788 base::RunLoop().RunUntilIdle(); |
| 789 ExistingUserControllerTest::TearDownOnMainThread(); |
| 790 } |
| 791 |
| 787 protected: | 792 protected: |
| 788 void ExpectLoginFailure() { | 793 void ExpectLoginFailure() { |
| 789 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(2); | 794 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(2); |
| 790 EXPECT_CALL(*mock_login_display_, | 795 EXPECT_CALL(*mock_login_display_, |
| 791 ShowError(IDS_LOGIN_ERROR_GOOGLE_ACCOUNT_NOT_ALLOWED, 1, | 796 ShowError(IDS_LOGIN_ERROR_GOOGLE_ACCOUNT_NOT_ALLOWED, 1, |
| 792 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT)) | 797 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT)) |
| 793 .Times(1); | 798 .Times(1); |
| 794 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(1); | 799 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(1); |
| 795 } | 800 } |
| 796 void ExpectLoginSuccess() { | 801 void ExpectLoginSuccess() { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 838 GAIAAccountLogin_Failure) { | 843 GAIAAccountLogin_Failure) { |
| 839 ExpectLoginFailure(); | 844 ExpectLoginFailure(); |
| 840 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); | 845 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); |
| 841 UserContext user_context(gaia_account_id_); | 846 UserContext user_context(gaia_account_id_); |
| 842 user_context.SetKey(Key(kPassword)); | 847 user_context.SetKey(Key(kPassword)); |
| 843 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); | 848 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); |
| 844 existing_user_controller()->CompleteLogin(user_context); | 849 existing_user_controller()->CompleteLogin(user_context); |
| 845 } | 850 } |
| 846 | 851 |
| 847 } // namespace chromeos | 852 } // namespace chromeos |
| OLD | NEW |