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

Side by Side Diff: chrome/browser/chromeos/login/existing_user_controller_browsertest.cc

Issue 2817933003: Wait for Cryptohome service to be available on login. (Closed)
Patch Set: remove useless const and std::move Created 3 years, 8 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 766 matching lines...) Expand 10 before | Expand all | Expand 10 after
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/19 11:26:02 nit: Remove comment
Sergey Poromov 2017/04/19 11:38:06 Done.
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698