Convert chrome/browser/signin/dice_browsertest.cc to IdentityManager |
||||
Issue descriptionAPI used: - SigninManager::GetAccountIdForAuthInProgress() - SigninManager::SignOut() - SigninManager::StartSignInWithRefreshToken() - SigninManager::AuthInProgress()
,
Dec 13
,
Dec 18
(re: The only non-straightforward conversion is the usage of the delegate to check that the refresh token is the invalid token) 730 EXPECT_TRUE(GetTokenService()->RefreshTokenHasError(GetMainAccountID())); 731 EXPECT_EQ(MutableProfileOAuth2TokenServiceDelegate::kInvalidRefreshToken, 732 delegate->GetRefreshTokenForTest(GetMainAccountID())); (...) As Colin mentioned in comment #1, I will add a testing API for this. PS: I lean toward to think that both lines 730 and 731-732 test the same thing, and the latter could be omitted. /cc David, in case he has thoughts.
,
Dec 19
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1f535375675f3638137f67352b773cf6912343b9 commit 1f535375675f3638137f67352b773cf6912343b9 Author: Antonio Gomes <tonikitoo@igalia.com> Date: Wed Dec 19 19:32:46 2018 [s13n] Convert c/b/signin/dice_browsertest.cc to IdentityManager SigninManager and PO2TS are going to be an implementation detail of the IdentityManager, and eventually will not be exposed to clients out of //services/identity. This CL converts DiceBrowserTestBase and its subclasses accordingly. Two remarks: 1) The conversion assumes that the actual |refresh_token| an account holds to authenticate is an implementation detail of Identity service. Prior to this CL, the tests used to set an specific refresh_token value (eg. "other_token"), and later compared whether the account held this specific token. Now the identity utils methods hide the actual refresh_token set (see identity::MakeAccountAvailable) to an account, and rely on checking whether the authentication was successfully or not instead. 2) It adds a new API to AccountsMutator, AreAllCredentialsLoaded, which calls out to the respective PO2TS method. BUG= 890789 Change-Id: Id0e5e36b55dc1f9f8b1ab088833b08fdff58a9c5 Reviewed-on: https://chromium-review.googlesource.com/c/1383152 Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Reviewed-by: Colin Blundell <blundell@chromium.org> Reviewed-by: David Roger <droger@chromium.org> Cr-Commit-Position: refs/heads/master@{#617910} [modify] https://crrev.com/1f535375675f3638137f67352b773cf6912343b9/chrome/browser/signin/dice_browsertest.cc [modify] https://crrev.com/1f535375675f3638137f67352b773cf6912343b9/services/identity/public/cpp/identity_manager.h [modify] https://crrev.com/1f535375675f3638137f67352b773cf6912343b9/services/identity/public/cpp/identity_test_utils.cc [modify] https://crrev.com/1f535375675f3638137f67352b773cf6912343b9/services/identity/public/cpp/identity_test_utils.h
,
Dec 19
,
Dec 21
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9f76a7a36d68d8a075f71f405feb0388806d308c commit 9f76a7a36d68d8a075f71f405feb0388806d308c Author: Antonio Gomes <tonikitoo@igalia.com> Date: Fri Dec 21 11:40:30 2018 Use non-legacy signin method in DiceBrowserTestBase::SetupSignedInAccounts It turns out that identity::MakePrimaryAccountAvaialble replaces the legacy PrimaryAccountMutator::LegacyStartSigninWithRefreshTokenForPrimaryAccount method in the context of DiceBrowserTestBase::SetupSignedInAccounts (dice_browsertest.cc) just fine. CL is a follow up of [1], as per droger's remark. [1] https://crrev.com/c/1383152/1/chrome/browser/signin/dice_browsertest.cc#397 BUG= 890789 Change-Id: I8767d739b137b1638737e8a65b4006374ffe98f3 Reviewed-on: https://chromium-review.googlesource.com/c/1386645 Reviewed-by: David Roger <droger@chromium.org> Commit-Queue: Antonio Gomes <tonikitoo@igalia.com> Cr-Commit-Position: refs/heads/master@{#618502} [modify] https://crrev.com/9f76a7a36d68d8a075f71f405feb0388806d308c/chrome/browser/signin/dice_browsertest.cc
,
Jan 9
|
||||
►
Sign in to add a comment |
||||
Comment 1 by blundell@chromium.org
, Dec 4