OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "chrome/browser/chromeos/login/parallel_authenticator.h" | 5 #include "chrome/browser/chromeos/login/parallel_authenticator.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 | 683 |
684 // Set up state as though a cryptohome mount attempt has occurred and | 684 // Set up state as though a cryptohome mount attempt has occurred and |
685 // succeeded. | 685 // succeeded. |
686 state_->PresetCryptohomeStatus(true, 0); | 686 state_->PresetCryptohomeStatus(true, 0); |
687 state_->PresetOnlineLoginStatus(success, LoginFailure::None()); | 687 state_->PresetOnlineLoginStatus(success, LoginFailure::None()); |
688 SetAttemptState(auth_, state_.release()); | 688 SetAttemptState(auth_, state_.release()); |
689 | 689 |
690 RunResolve(auth_.get(), &message_loop_); | 690 RunResolve(auth_.get(), &message_loop_); |
691 } | 691 } |
692 | 692 |
693 TEST_F(ParallelAuthenticatorTest, DriveNeedNewPassword) { | 693 TEST_F(ParallelAuthenticatorTest, FLAKY_DriveNeedNewPassword) { |
694 FailOnLoginSuccess(); // Set failing on success as the default... | 694 FailOnLoginSuccess(); // Set failing on success as the default... |
695 // ...but expect ONE successful login first. | 695 // ...but expect ONE successful login first. |
696 ExpectLoginSuccess(username_, password_, result_, true); | 696 ExpectLoginSuccess(username_, password_, result_, true); |
697 GoogleServiceAuthError error( | 697 GoogleServiceAuthError error( |
698 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); | 698 GoogleServiceAuthError::INVALID_GAIA_CREDENTIALS); |
699 LoginFailure failure = LoginFailure::FromNetworkAuthFailure(error); | 699 LoginFailure failure = LoginFailure::FromNetworkAuthFailure(error); |
700 ExpectLoginFailure(failure); | 700 ExpectLoginFailure(failure); |
701 | 701 |
702 // Set up state as though a cryptohome mount attempt has occurred and | 702 // Set up state as though a cryptohome mount attempt has occurred and |
703 // succeeded. | 703 // succeeded. |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
776 FilePath tmp_file_path = FakeLocalaccountFile(username_); | 776 FilePath tmp_file_path = FakeLocalaccountFile(username_); |
777 ReadLocalaccountFile(auth_.get(), tmp_file_path.BaseName().value()); | 777 ReadLocalaccountFile(auth_.get(), tmp_file_path.BaseName().value()); |
778 | 778 |
779 auth_->AuthenticateToUnlock(username_, ""); | 779 auth_->AuthenticateToUnlock(username_, ""); |
780 message_loop_.Run(); | 780 message_loop_.Run(); |
781 | 781 |
782 Delete(tmp_file_path, false); | 782 Delete(tmp_file_path, false); |
783 } | 783 } |
784 | 784 |
785 } // namespace chromeos | 785 } // namespace chromeos |
OLD | NEW |