Eliminate FakeIdentityProvider
As a convenience step in the porting of the IdentityProvider interface and implementation away from OAuth2TokenService, this CL eliminates FakeIdentityProvider. This change reduces the number of IdentityProvider implementations to two and will avoid duplication of code between FakeIdentityProvider and DeviceIdentityProvider when IdentityProvider and ProfileIdentityProvider are later ported away from knowledge of/dependence on OAuth2TokenService. The change is straightforward: The remaining tests that use FakeIdentityProvider don't use any of its custom hooks for testing. All that was necessary was to let ProfileIdentityProvider have a test constructor that allows for its SigninManager instance to be null. This avoids the need for these tests to construct a FakeSigninManager(Base) instance, which is a pain to do. Once ProfileIdentityProvider is converted to take in IdentityManager, this test constructor can go away, as it is a breeze to construct IdentityManager in a testing context via IdentityTestEnvironment. Bug: 809452 Change-Id: I2f699d6776542626800e59bda731579338076077 Reviewed-on: https://chromium-review.googlesource.com/1087054Reviewed-by:Pavel Yatsuk <pavely@chromium.org> Commit-Queue: Colin Blundell <blundell@chromium.org> Cr-Commit-Position: refs/heads/master@{#564856}
Showing
Please register or sign in to comment