[s13n] Migrate c/b/policy/cloud/user_policy_signin_service_unittest.cc away...
[s13n] Migrate c/b/policy/cloud/user_policy_signin_service_unittest.cc away from AccountTrackerService The CL gets rid of the direct uses of AccountTrackerService API, in favor of IdentityManager APIs. The former becoming an implementation detail of the later. Two particularities are worth highlighting: 1) In test SignOutThenSignInAgain, IdentityTestEnvironment::MakeAccountAvailable gets called in a roll (via TestSuccessfulSignin() -> RegisterPolicyClientWithCallback()), being calls interpolated by a call to IdentityTestEnvironment::ClearPrimaryAccount. In order for ClearPrimaryAccount to trigger the removal of accounts in AccountTrackerService when tokens are revoked with PO2TS, AccountFetcherService::EnableNetworkFetchesForTest() is called. 2) The change above (1) forces the execution of Android specific code in AccountFetcherService, namely ChildAccountInfoFetcherAndroid within the scope of test SignOutThenSignInAgain. For this to get processed properly, the call to ChildAccountInfoFetcherAndroid::InitializeForTests() was added as well. Similar pattern is seen on [1]. [1] https://cs.chromium.org/chromium/src/components/signin/core/browser/account_tracker_service_unittest.cc?l=227 BUG=922756 Change-Id: I16c7c8489896fbe3349941d61102464e94060aba Reviewed-on: https://chromium-review.googlesource.com/c/1436534 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by:Colin Blundell <blundell@chromium.org> Reviewed-by:
Pavol Marko <pmarko@chromium.org> Cr-Commit-Position: refs/heads/master@{#627002}
Showing
Please register or sign in to comment