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

Unified Diff: chrome/browser/chromeos/policy/consumer_enrollment_handler_factory_unittest.cc

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unit tests. Created 4 years, 10 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/policy/consumer_enrollment_handler_factory_unittest.cc
diff --git a/chrome/browser/chromeos/policy/consumer_enrollment_handler_factory_unittest.cc b/chrome/browser/chromeos/policy/consumer_enrollment_handler_factory_unittest.cc
index c0f2c93fe57679ac0fdcb58aa1b0eecef620db6f..5532529afefb13521982c72050bdd277a1d8d6b0 100644
--- a/chrome/browser/chromeos/policy/consumer_enrollment_handler_factory_unittest.cc
+++ b/chrome/browser/chromeos/policy/consumer_enrollment_handler_factory_unittest.cc
@@ -44,15 +44,20 @@ class ConsumerEnrollmentHandlerFactoryTest : public testing::Test {
make_scoped_ptr(fake_service_));
// Set up FakeChromeUserManager.
- fake_user_manager_->AddUser(AccountId::FromUserEmail(kTestOwner));
- fake_user_manager_->AddUser(AccountId::FromUserEmail(kTestUser));
- fake_user_manager_->set_owner_id(AccountId::FromUserEmail(kTestOwner));
+ fake_user_manager_->AddUser(owner_account_id);
+ fake_user_manager_->AddUser(test_account_id);
+ fake_user_manager_->set_owner_id(owner_account_id);
}
void SetUp() override {
+ testing::Test::SetUp();
+
ASSERT_TRUE(testing_profile_manager_->SetUp());
}
+ const AccountId owner_account_id = AccountId::FromUserEmail(kTestOwner);
+ const AccountId test_account_id = AccountId::FromUserEmail(kTestUser);
+
content::TestBrowserThreadBundle thread_bundle_;
FakeConsumerManagementService* fake_service_;
chromeos::FakeChromeUserManager* fake_user_manager_;
@@ -61,7 +66,8 @@ class ConsumerEnrollmentHandlerFactoryTest : public testing::Test {
};
TEST_F(ConsumerEnrollmentHandlerFactoryTest, ServiceIsCreated) {
- Profile* profile = testing_profile_manager_->CreateTestingProfile(kTestOwner);
+ Profile* profile = testing_profile_manager_->CreateTestingProfile(
+ owner_account_id.GetUserEmail());
EXPECT_TRUE(ConsumerEnrollmentHandlerFactory::GetForBrowserContext(profile));
}

Powered by Google App Engine
This is Rietveld 408576698