Allow IdentityTestEnvironment to be used in Profile-based unittests
Currently IdentityTestEnvironment only works if it can internally construct the IdentityManager instance that it uses. This is definitely the cleanest mode of operation (and long-term the only targeted one) However, it prevents IdentityTestEnvironment's usage in //chrome-level unittests wherein the IdentityManager instance that the test interacts with must the one constructed via the Profile (i.e., because the production code being tested obtains IdentityManager from the Profile). This CL adds support for using IdentityTestEnvironment in this context. Specifically, it adds a new IdentityTestEnvironment constructor that takes in an IdentityManager instance as well as its dependencies and a //chrome-level adaptor that configures Profile to build the necessary fakes and wraps an IdentityTestEnvironment instance using this new constructor. Bug: 882865 Change-Id: If45f29643fc5a2cacf357ac159c709b068443e9c Reviewed-on: https://chromium-review.googlesource.com/c/1280264 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by:Sylvain Defresne <sdefresne@chromium.org> Reviewed-by:
David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#600350}
Showing
Please register or sign in to comment