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

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

Issue 135193007: Use user specific NSSDatabase in CertLoader. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 11 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 | Annotate | Revision Log
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 "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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698