| 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 "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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 CrosSettings::Get()->SetBoolean(kPolicyMissingMitigationMode, true); | 310 CrosSettings::Get()->SetBoolean(kPolicyMissingMitigationMode, true); |
| 311 | 311 |
| 312 // Initialize login state for this test to verify the login state is changed | 312 // Initialize login state for this test to verify the login state is changed |
| 313 // to SAFE_MODE. | 313 // to SAFE_MODE. |
| 314 LoginState::Initialize(); | 314 LoginState::Initialize(); |
| 315 | 315 |
| 316 EXPECT_EQ(ParallelAuthenticator::CONTINUE, | 316 EXPECT_EQ(ParallelAuthenticator::CONTINUE, |
| 317 SetAndResolveState(auth_.get(), state_.release())); | 317 SetAndResolveState(auth_.get(), state_.release())); |
| 318 EXPECT_TRUE(LoginState::Get()->IsInSafeMode()); | 318 EXPECT_TRUE(LoginState::Get()->IsInSafeMode()); |
| 319 | 319 |
| 320 // Simulate TPM token ready event. The tpm token parameters are not | 320 // Simulate TPM token ready event. |
| 321 // actually used by the DeviceSettingsService, so it is OK to pass arbitrary | 321 DeviceSettingsService::Get()->OnTPMTokenReady(); |
| 322 // values. | |
| 323 DeviceSettingsService::Get()->OnTPMTokenReady("pin", "token_name", 0); | |
| 324 | 322 |
| 325 // Flush all the pending operations. The operations should induce an owner | 323 // Flush all the pending operations. The operations should induce an owner |
| 326 // verification. | 324 // verification. |
| 327 device_settings_test_helper_.Flush(); | 325 device_settings_test_helper_.Flush(); |
| 328 // and test that the mount has succeeded. | 326 // and test that the mount has succeeded. |
| 329 state_.reset(new TestAttemptState(UserContext(username_, | 327 state_.reset(new TestAttemptState(UserContext(username_, |
| 330 password_, | 328 password_, |
| 331 std::string()), | 329 std::string()), |
| 332 "", | 330 "", |
| 333 "", | 331 "", |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 .Times(1) | 603 .Times(1) |
| 606 .RetiresOnSaturation(); | 604 .RetiresOnSaturation(); |
| 607 | 605 |
| 608 auth_->AuthenticateToUnlock(UserContext(username_, | 606 auth_->AuthenticateToUnlock(UserContext(username_, |
| 609 std::string(), | 607 std::string(), |
| 610 std::string())); | 608 std::string())); |
| 611 base::MessageLoop::current()->Run(); | 609 base::MessageLoop::current()->Run(); |
| 612 } | 610 } |
| 613 | 611 |
| 614 } // namespace chromeos | 612 } // namespace chromeos |
| OLD | NEW |