| Index: chrome/browser/sync/profile_sync_service_unittest.cc
|
| diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc
|
| index 9788f238df3fd3936afaef5c9f8bf2a9833cdfb1..5b69f26bea64e64f016aecb1079e74963297b413 100644
|
| --- a/chrome/browser/sync/profile_sync_service_unittest.cc
|
| +++ b/chrome/browser/sync/profile_sync_service_unittest.cc
|
| @@ -685,6 +685,30 @@ TEST_F(ProfileSyncServiceTest, RevokeAccessTokenFromTokenService) {
|
| EXPECT_TRUE(service()->GetAccessTokenForTest().empty());
|
| }
|
|
|
| +// CrOS does not support signout.
|
| +#if !defined(OS_CHROMEOS)
|
| +TEST_F(ProfileSyncServiceTest, SignOutRevokeAccessToken) {
|
| + CreateService(browser_sync::AUTO_START);
|
| + IssueTestTokens();
|
| + ExpectDataTypeManagerCreation(1, GetDefaultConfigureCalledCallback());
|
| + ExpectSyncBackendHostCreation(1);
|
| + InitializeForNthSync();
|
| + EXPECT_TRUE(service()->IsSyncActive());
|
| +
|
| + std::string primary_account_id =
|
| + SigninManagerFactory::GetForProfile(profile())
|
| + ->GetAuthenticatedAccountId();
|
| + ProfileOAuth2TokenServiceFactory::GetForProfile(profile())
|
| + ->LoadCredentials(primary_account_id);
|
| + base::RunLoop().RunUntilIdle();
|
| + EXPECT_FALSE(service()->GetAccessTokenForTest().empty());
|
| +
|
| + SigninManagerFactory::GetForProfile(profile())
|
| + ->SignOut(signin_metrics::SIGNOUT_TEST);
|
| + EXPECT_TRUE(service()->GetAccessTokenForTest().empty());
|
| +}
|
| +#endif
|
| +
|
| #if BUILDFLAG(ENABLE_PRE_SYNC_BACKUP)
|
| TEST_F(ProfileSyncServiceTest, DontStartBackupOnBrowserStart) {
|
| CreateServiceWithoutSignIn();
|
|
|