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 // Overriden from ExistingUserControllerTest: | |
Roman Sorokin (ftl)
2017/04/18 14:30:18
nit: Remove the comment
| |
788 void TearDownOnMainThread() override { | |
789 base::RunLoop().RunUntilIdle(); | |
790 ExistingUserControllerTest::TearDownOnMainThread(); | |
791 } | |
792 | |
787 protected: | 793 protected: |
788 void ExpectLoginFailure() { | 794 void ExpectLoginFailure() { |
789 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(2); | 795 EXPECT_CALL(*mock_login_display_, SetUIEnabled(false)).Times(2); |
790 EXPECT_CALL(*mock_login_display_, | 796 EXPECT_CALL(*mock_login_display_, |
791 ShowError(IDS_LOGIN_ERROR_GOOGLE_ACCOUNT_NOT_ALLOWED, 1, | 797 ShowError(IDS_LOGIN_ERROR_GOOGLE_ACCOUNT_NOT_ALLOWED, 1, |
792 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT)) | 798 HelpAppLauncher::HELP_CANT_ACCESS_ACCOUNT)) |
793 .Times(1); | 799 .Times(1); |
794 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(1); | 800 EXPECT_CALL(*mock_login_display_, SetUIEnabled(true)).Times(1); |
795 } | 801 } |
796 void ExpectLoginSuccess() { | 802 void ExpectLoginSuccess() { |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
838 GAIAAccountLogin_Failure) { | 844 GAIAAccountLogin_Failure) { |
839 ExpectLoginFailure(); | 845 ExpectLoginFailure(); |
840 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); | 846 EXPECT_CALL(*mock_login_display_host_, OnCompleteLogin()).Times(1); |
841 UserContext user_context(gaia_account_id_); | 847 UserContext user_context(gaia_account_id_); |
842 user_context.SetKey(Key(kPassword)); | 848 user_context.SetKey(Key(kPassword)); |
843 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); | 849 user_context.SetUserIDHash(gaia_account_id_.GetUserEmail()); |
844 existing_user_controller()->CompleteLogin(user_context); | 850 existing_user_controller()->CompleteLogin(user_context); |
845 } | 851 } |
846 | 852 |
847 } // namespace chromeos | 853 } // namespace chromeos |
OLD | NEW |