OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 | 528 |
529 RunResolve(auth_.get(), &message_loop_); | 529 RunResolve(auth_.get(), &message_loop_); |
530 } | 530 } |
531 | 531 |
532 TEST_F(ParallelAuthenticatorTest, DriveOfflineLoginGetNewPassword) { | 532 TEST_F(ParallelAuthenticatorTest, DriveOfflineLoginGetNewPassword) { |
533 ExpectLoginSuccess(username_, password_, result_, true); | 533 ExpectLoginSuccess(username_, password_, result_, true); |
534 FailOnLoginFailure(); | 534 FailOnLoginFailure(); |
535 | 535 |
536 // Set up mock cryptohome library to respond successfully to a key migration. | 536 // Set up mock cryptohome library to respond successfully to a key migration. |
537 mock_library_->SetUp(true, 0); | 537 mock_library_->SetUp(true, 0); |
538 EXPECT_CALL(*mock_library_, AsyncMigrateKey(username_, _, _, _)) | 538 EXPECT_CALL(*mock_library_, AsyncMigrateKey(username_, |
| 539 state_->ascii_hash, |
| 540 _, |
| 541 _)) |
539 .Times(1) | 542 .Times(1) |
540 .RetiresOnSaturation(); | 543 .RetiresOnSaturation(); |
541 EXPECT_CALL(*mock_library_, GetSystemSalt()) | 544 EXPECT_CALL(*mock_library_, GetSystemSalt()) |
542 .WillOnce(Return(CryptohomeBlob(2, 0))) | 545 .WillOnce(Return(CryptohomeBlob(2, 0))) |
543 .RetiresOnSaturation(); | 546 .RetiresOnSaturation(); |
544 | 547 |
545 // Set up state as though a cryptohome mount attempt has occurred and | 548 // Set up state as though a cryptohome mount attempt has occurred and |
546 // succeeded; also, an online request that never made it. | 549 // succeeded; also, an online request that never made it. |
547 state_->PresetCryptohomeStatus(true, 0); | 550 state_->PresetCryptohomeStatus(true, 0); |
548 // state_ is released further down. | 551 // state_ is released further down. |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
673 FilePath tmp_file_path = FakeLocalaccountFile(username_); | 676 FilePath tmp_file_path = FakeLocalaccountFile(username_); |
674 ReadLocalaccountFile(auth_.get(), tmp_file_path.BaseName().value()); | 677 ReadLocalaccountFile(auth_.get(), tmp_file_path.BaseName().value()); |
675 | 678 |
676 auth_->AuthenticateToUnlock(username_, ""); | 679 auth_->AuthenticateToUnlock(username_, ""); |
677 message_loop_.Run(); | 680 message_loop_.Run(); |
678 | 681 |
679 Delete(tmp_file_path, false); | 682 Delete(tmp_file_path, false); |
680 } | 683 } |
681 | 684 |
682 } // namespace chromeos | 685 } // namespace chromeos |
OLD | NEW |