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)); |
} |