New issue
Advanced search Search tips

Issue 904404 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 19
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug


Sign in to add a comment

Design and implement solution for migrating browsertests to use solely IdentityManager

Project Member Reported by blundell@chromium.org, Nov 12

Issue description

Browsertests in general do not use fake objects and thus are not good candidates for using IdentityTestEnvironment. Currently, we have been porting browsertests to IdentityManager via identity_test_utils.h, which does not require fake objects. However, that porting leaves the usage of the underlying deprecated classes visible. This bug tracks refining that approach to enable elimination of the visibility of those classes.
 
Blocking: 903873
Blocking: 903862
Blocking: 903860
Blocking: 903859
Labels: Proj-Servicification-VendorBug
After thinking about this, the approach I'd like to take is the following:

- We make the identity_test_utils.* functions that take in an IdentityManager instance plus other objects friends of IdentityManager and change them to not take in the other objects, instead obtaining them internally from IdentityManager.
- All the callsites of these functions then naturally change to not pass those other objects, eliminating those callsites' need to know about the objects directly.

In the medium term, the implementation of these APIs will likely be changed to occur via the mutator objects, at which point the friending can go away.
Owner: ma...@igalia.com
Status: Started (was: Available)
Taking this one
Blocking: 906020
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 19

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47

commit d3f0bde5c715dc0cc890d00ad02d270e51c8bd47
Author: Mario Sanchez Prada <mario@igalia.com>
Date: Mon Nov 19 09:52:10 2018

Only require IdentityManager as main parameter for identity_test_utils.h APIs

This will remove the need to know about specific instances of SigninManager,
AccountTrackerService, ProfileOAuth2TokenService and GaiaCookieManagerService
from the calling places for those methods.

Also move the SigninManagerForTest definition in identity_test_environment.h
one level up, to allow sharing it among |IdentityManagerDependenciesOwner|
and |IdentityTestEnvironment| without relying on such definition being also
available from identity_test_utils.h (from where it's now being removed due
to no longer being required by those test utilities).

Bug:  904404 
Change-Id: If96b0c7dea763030dc7372d58922f82a31eb5733
Reviewed-on: https://chromium-review.googlesource.com/c/1336127
Commit-Queue: Mario Sanchez Prada <mario@igalia.com>
Reviewed-by: Toni Baržić <tbarzic@chromium.org>
Reviewed-by: Marc Treib <treib@chromium.org>
Reviewed-by: David Roger <droger@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Colin Blundell <blundell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609216}
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/chrome/browser/chromeos/extensions/file_manager/file_manager_private_apitest.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/chrome/browser/extensions/api/identity/identity_apitest.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/chrome/browser/sync/test/integration/profile_sync_service_harness.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/chrome/browser/sync/test/integration/secondary_account_helper.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/chrome/browser/ui/extensions/extension_installed_bubble_browsertest.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/services/identity/public/cpp/identity_manager.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/services/identity/public/cpp/identity_manager.h
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/services/identity/public/cpp/identity_manager_unittest.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/services/identity/public/cpp/identity_test_environment.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/services/identity/public/cpp/identity_test_environment.h
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/services/identity/public/cpp/identity_test_utils.cc
[modify] https://crrev.com/d3f0bde5c715dc0cc890d00ad02d270e51c8bd47/services/identity/public/cpp/identity_test_utils.h

Status: Fixed (was: Started)

Sign in to add a comment