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

Unified Diff: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc

Issue 516243002: Instantiation of OwnerKeyUtil is delegated to OwnerSettingsServiceFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed empty ownership_test_support target. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
diff --git a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
index 454ffdc3a5a59166bca25b4b54a46b85a44261c8..afd886381e41e00d938b25e26c428e10821c0fce 100644
--- a/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
+++ b/chrome/browser/chromeos/login/auth/cryptohome_authenticator_unittest.cc
@@ -134,7 +134,9 @@ class CryptohomeAuthenticatorTest : public testing::Test {
user_manager_enabler_(user_manager_),
mock_caller_(NULL),
mock_homedir_methods_(NULL),
- owner_key_util_(new ownership::MockOwnerKeyUtil) {
+ owner_key_util_(new ownership::MockOwnerKeyUtil()) {
+ OwnerSettingsServiceFactory::GetInstance()->SetOwnerKeyUtilForTesting(
+ owner_key_util_);
user_context_.SetKey(Key("fakepass"));
user_context_.SetUserIDHash("me_nowhere_com_hash");
const user_manager::User* user =
@@ -165,15 +167,12 @@ class CryptohomeAuthenticatorTest : public testing::Test {
SystemSaltGetter::Initialize();
- OwnerSettingsService::SetOwnerKeyUtilForTesting(owner_key_util_);
-
auth_ = new ChromeCryptohomeAuthenticator(&consumer_);
state_.reset(new TestAttemptState(user_context_, false));
}
// Tears down the test fixture.
virtual void TearDown() {
- OwnerSettingsService::SetOwnerKeyUtilForTesting(NULL);
SystemSaltGetter::Shutdown();
DBusThreadManager::Shutdown();

Powered by Google App Engine
This is Rietveld 408576698