Fix IdentityAPITest to handle DICE semantics
In identity_apitest.cc, there is a test that verifies that when the primary account is cleared, the chrome.identity.onSignInChanged event is fired. This event is fired when a refresh token is added/removed for a given account. However, when DICE is enabled, clearing the primary account does not result in its refresh token being removed (and hence does not cause this event to fire). This CL updates this test to short-circuit out if DICE is enabled. Note that a different existing test already verifies that an event is fired when the refresh token of the primary account is removed. This CL is concretely necessary to unblock the elimination of FakeSigninManager. When FakeSigninManager is eliminated, this test (and others) will use a SigninManager instance that has been configured with the account consistency mode passed by SigninManagerFactory, rather than the account consistency mode being hardcoded to disabled. Once the test is using SigninManager, we will update it to check that the event is *not* fired if DICE is enabled. It's not yet possible to do that as the test is still using FakeSigninManager. Bug: 796544 Change-Id: I8ec51b1c960ea068cb984c1781e2cc84c72ce0e4 Reviewed-on: https://chromium-review.googlesource.com/c/1488876Reviewed-by:David Roger <droger@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#635486}
Showing
Please register or sign in to comment