| Index: chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
|
| diff --git a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
|
| index 9bd390857d68ad98a1925e764dbeb9a7bf0c045f..00ae9b02157d4f9f6a3f904f466d43ba56c56e94 100644
|
| --- a/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
|
| +++ b/chrome/browser/policy/cloud/user_policy_signin_service_unittest.cc
|
| @@ -65,6 +65,7 @@ namespace policy {
|
|
|
| namespace {
|
|
|
| +const char kTestGaiaId[] = "12345";
|
| const char kTestUser[] = "testuser@test.com";
|
|
|
| #if !defined(OS_ANDROID)
|
| @@ -390,7 +391,7 @@ class UserPolicySigninServiceSignedInTest : public UserPolicySigninServiceTest {
|
|
|
| // Set the user as signed in.
|
| SigninManagerFactory::GetForProfile(profile_.get())->
|
| - SetAuthenticatedUsername(kTestUser);
|
| + SetAuthenticatedAccountInfo(kTestGaiaId, kTestUser);
|
|
|
| // Let the SigninService know that the profile has been created.
|
| content::NotificationService::current()->Notify(
|
| @@ -463,8 +464,8 @@ TEST_F(UserPolicySigninServiceTest, SignInAfterInit) {
|
| ASSERT_FALSE(manager_->core()->service());
|
|
|
| // Now sign in the user.
|
| - SigninManagerFactory::GetForProfile(profile_.get())->SetAuthenticatedUsername(
|
| - kTestUser);
|
| + SigninManagerFactory::GetForProfile(profile_.get())
|
| + ->SetAuthenticatedAccountInfo(kTestGaiaId, kTestUser);
|
|
|
| // Complete initialization of the store.
|
| mock_store_->NotifyStoreLoaded();
|
| @@ -487,8 +488,8 @@ TEST_F(UserPolicySigninServiceTest, SignInWithNonEnterpriseUser) {
|
| ASSERT_FALSE(manager_->core()->service());
|
|
|
| // Now sign in a non-enterprise user (blacklisted gmail.com domain).
|
| - SigninManagerFactory::GetForProfile(profile_.get())->SetAuthenticatedUsername(
|
| - "non_enterprise_user@gmail.com");
|
| + SigninManagerFactory::GetForProfile(profile_.get())
|
| + ->SetAuthenticatedAccountInfo("12345", "non_enterprise_user@gmail.com");
|
|
|
| // Complete initialization of the store.
|
| mock_store_->NotifyStoreLoaded();
|
| @@ -509,8 +510,8 @@ TEST_F(UserPolicySigninServiceTest, UnregisteredClient) {
|
| ASSERT_FALSE(manager_->core()->service());
|
|
|
| // Now sign in the user.
|
| - SigninManagerFactory::GetForProfile(profile_.get())->SetAuthenticatedUsername(
|
| - kTestUser);
|
| + SigninManagerFactory::GetForProfile(profile_.get())
|
| + ->SetAuthenticatedAccountInfo(kTestGaiaId, kTestUser);
|
|
|
| // Make oauth token available.
|
| GetTokenService()->IssueRefreshTokenForUser(kTestUser,
|
| @@ -537,8 +538,8 @@ TEST_F(UserPolicySigninServiceTest, RegisteredClient) {
|
| ASSERT_FALSE(manager_->core()->service());
|
|
|
| // Now sign in the user.
|
| - SigninManagerFactory::GetForProfile(profile_.get())->SetAuthenticatedUsername(
|
| - kTestUser);
|
| + SigninManagerFactory::GetForProfile(profile_.get())
|
| + ->SetAuthenticatedAccountInfo(kTestGaiaId, kTestUser);
|
|
|
| // Make oauth token available.
|
| GetTokenService()->IssueRefreshTokenForUser(kTestUser,
|
|
|