commit | b64e54c9a221efad82a4a60956cd3b58ac371059 | [log] [tgz] |
---|---|---|
author | Colin Blundell <blundell@chromium.org> | Fri Oct 12 12:09:06 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Oct 12 12:09:06 2018 |
tree | ce6a9c3bd3080132052eb0a4611b2d72d01c9e81 | |
parent | 84056b7e0dee6cb71b889254c2f33c0b338002fb [diff] |
Enable IdentityTestEnvironment to take in IdentityManager's dependencies Currently, IdentityTestEnvironment internally constructs all the dependencies of IdentityManager as well as the IdentityManager object itself. This behavior is nice for hiding the fact that IdentityManager has these dependencies from consumers, but doesn't allow for usage of IdentityTestEnviroment in incremental conversion of tests that have broad direct usage of these dependencies. Concretely, profile_sync_test_util.h provides one such problematic case: it constructs and directly exposes these dependencies, which are then broadly used by a set of tests that consume this utility class. Converting all these tests in one go is not practical. This CL adds an alternate IdentityTestEnvironment constructor that takes in the dependencies and constructs IdentityManager via those passed-in dependencies. To enable this constructor, the CL also encapsulates the fact that IdentityTestEnvironment otherwise obtains these dependencies from an internal object within the current IdentityTestEnvironment constructor. It also moves ownership of IdentityManager from that internal object to IdentityTestEnvironment itself so that it can be created/owned independent of that internal object. A followup CL will use this new constructor. Bug: 886599 Change-Id: I4c6a503dcc11c327193f80bc7d7c48e467c6919b Reviewed-on: https://chromium-review.googlesource.com/c/1273298 Commit-Queue: Colin Blundell <blundell@chromium.org> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#599178}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .