Commit 95e88133 authored by Sergio Villar Senin's avatar Sergio Villar Senin Committed by Commit Bot

Rename some IdentityManager unit tests referencing "EventBefore"

Early implementations of IdentityManager used to cache its internal
state and update it (notifying its observers) via custom
callbacks. That's no longer the case as IdentityManager acts now as a
passthrough to the backing classes. There is no guarantee that the
IdentityManager is going to receive the "events" before any other
observer.

The tests are still valid though, as they can be used to verify
that we get consistent values from IdentityManager from within
SigninManagerBase::Observer and OAuth2TokenService::Observer while
we transition all of these observers (and the flows that start from
them) incrementally to IdentityManager.

Bug: 892077
Change-Id: I4bfea3f5114c5ad21444af43e6bfd119ffce65ba
Reviewed-on: https://chromium-review.googlesource.com/c/1264199
Commit-Queue: Sergio Villar <svillar@igalia.com>
Reviewed-by: default avatarColin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#597068}
parent 76bdd72a
...@@ -1219,8 +1219,9 @@ TEST_F(IdentityManagerTest, ObserveAccessTokenFetch) { ...@@ -1219,8 +1219,9 @@ TEST_F(IdentityManagerTest, ObserveAccessTokenFetch) {
} }
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
TEST_F(IdentityManagerTest, TEST_F(
IdentityManagerGetsSignInEventBeforeSigninManagerObserver) { IdentityManagerTest,
IdentityManagerGivesConsistentValuesFromSigninManagerObserverNotificationOfSignIn) {
signin_manager()->ForceSignOut(); signin_manager()->ForceSignOut();
base::RunLoop run_loop; base::RunLoop run_loop;
...@@ -1245,8 +1246,9 @@ TEST_F(IdentityManagerTest, ...@@ -1245,8 +1246,9 @@ TEST_F(IdentityManagerTest,
EXPECT_EQ(kTestEmail, primary_account_from_signin_callback.email); EXPECT_EQ(kTestEmail, primary_account_from_signin_callback.email);
} }
TEST_F(IdentityManagerTest, TEST_F(
IdentityManagerGetsSignOutEventBeforeSigninManagerObserver) { IdentityManagerTest,
IdentityManagerGivesConsistentValuesFromSigninManagerObserverNotificationOfSignOut) {
base::RunLoop run_loop; base::RunLoop run_loop;
TestSigninManagerObserver signin_manager_observer(signin_manager()); TestSigninManagerObserver signin_manager_observer(signin_manager());
signin_manager_observer.set_on_google_signed_out_callback( signin_manager_observer.set_on_google_signed_out_callback(
...@@ -1485,8 +1487,9 @@ TEST_F(IdentityManagerTest, CallbackSentOnRefreshTokenRemovalOfUnknownAccount) { ...@@ -1485,8 +1487,9 @@ TEST_F(IdentityManagerTest, CallbackSentOnRefreshTokenRemovalOfUnknownAccount) {
->account_from_refresh_token_removed_callback()); ->account_from_refresh_token_removed_callback());
} }
TEST_F(IdentityManagerTest, TEST_F(
IdentityManagerGetsTokenUpdateEventBeforeTokenServiceObserver) { IdentityManagerTest,
IdentityManagerGivesConsistentValuesFromTokenServiceObserverNotificationOfTokenUpdate) {
std::string account_id = signin_manager()->GetAuthenticatedAccountId(); std::string account_id = signin_manager()->GetAuthenticatedAccountId();
base::RunLoop run_loop; base::RunLoop run_loop;
...@@ -1511,8 +1514,9 @@ TEST_F(IdentityManagerTest, ...@@ -1511,8 +1514,9 @@ TEST_F(IdentityManagerTest,
run_loop.Run(); run_loop.Run();
} }
TEST_F(IdentityManagerTest, TEST_F(
IdentityManagerGetsTokenRemovalEventBeforeTokenServiceObserver) { IdentityManagerTest,
IdentityManagerGivesConsistentValuesFromTokenServiceObserverNotificationOfTokenRemoval) {
std::string account_id = signin_manager()->GetAuthenticatedAccountId(); std::string account_id = signin_manager()->GetAuthenticatedAccountId();
base::RunLoop run_loop; base::RunLoop run_loop;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment