-
Colin Blundell authored
The GCMAccountTracker and AccountTracker classes listen for the GoogleSigninSucceeded/GoogleSignedOut callbacks indirectly via ProfileIdentityProvider. Their unittests cause these callbacks to fire via calls to FakeIdentityProvider::{LogIn, LogOut}. These classes are also used on ChromeOS, where the callbacks will never fire (ChromeOS does not use SigninManager, which fires the callbacks). The structure of these unittests presents a challenge to refactoring the production code to depend on SigninManager directly: the SigninManagerBase test infrastructure, which is all that can be used on ChromeOS, rightfully has no mechanism for firing the callbacks. This CL rationalizes these tests for ChromeOS via: - Commenting out the tests that actually exercise the callbacks firing - Changing the rest of the tests to simply set the primary account info *without* causing the callbacks to fire - Renaming utility functions as relevant to make the structure clear Making this change paves the way for a followup change that ports these classes (and their tests) to depend directly on SigninManager. Bug: 809923 Change-Id: Ia6c067d845f7bbb7bd78928ac163bda2fdd77a20 Reviewed-on: https://chromium-review.googlesource.com/1042391Reviewed-by:Peter Beverloo <peter@chromium.org> Reviewed-by:
Roger Tawa <rogerta@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#558235}
04720563