Write implementation and test for PrimaryAccountMutatorImpl:ClearPrimaryAccount |
|||||
Issue descriptionThe implementation should be similar to what is done in IdentityManager::ClearPrimaryAccount (the only difference is that the enumerator have different names and that the SigninManager is a member variable). The method prototype should also be changed to return a bool corresponding to success/failure (and the comment updated). Failure would happen when there are no primary account or when signing out is disallowed (this case should be left for later however). Then tests should try the different cases of signing out when not signed in (should fail), signing out when signed in with all possible values for the ClearAccountsAction enumeration (post condition should check that secondary accounts have been cleared or not depending on the value passed).
,
Nov 16
,
Nov 22
I also need to implement this one at the same time than LegacyIsPrimaryAccountAuthInProgress, LegacyStartSigninWithRefreshTokenForPrimaryAccount LegacyCompletePendingPrimaryAccountSignin and LegacyPrimaryAccountForAuthInProgress to implement sane unit tests without introducing artificial utilities in IdentityTestEnvironment. Self-assigning
,
Nov 22
hmmm, maybe not "implementing this one at the same time", but **before** those, so that I can use it in the tests related to AuthInProgress to make sure that the authentication process it not still ongoing after cancelling a signin process (using ClearPrimaryAccount). => Blocking: 906063
,
Nov 27
,
Nov 28
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6048bc84b1a6dedb7d5bcb6f329500af962a9ad1 commit 6048bc84b1a6dedb7d5bcb6f329500af962a9ad1 Author: Mario Sanchez Prada <mario@igalia.com> Date: Wed Nov 28 09:59:20 2018 Implement PrimaryAccountMutator::ClearPrimaryAccount() Additionally, change the signature of the method to return a bool so that we can report failure (i.g. hasn't got a primary account) or success and provide new unit tests to check the effect of passing different values of PrimaryAccountMutator::ClearAccountsAction. Bug: 906056 Change-Id: I3c77e05334f8a5d7e12e7788b36d7a2895b905b1 Reviewed-on: https://chromium-review.googlesource.com/c/1348451 Commit-Queue: Mario Sanchez Prada <mario@igalia.com> Reviewed-by: Sylvain Defresne <sdefresne@chromium.org> Cr-Commit-Position: refs/heads/master@{#611622} [modify] https://crrev.com/6048bc84b1a6dedb7d5bcb6f329500af962a9ad1/services/identity/public/cpp/primary_account_mutator.h [modify] https://crrev.com/6048bc84b1a6dedb7d5bcb6f329500af962a9ad1/services/identity/public/cpp/primary_account_mutator_impl.cc [modify] https://crrev.com/6048bc84b1a6dedb7d5bcb6f329500af962a9ad1/services/identity/public/cpp/primary_account_mutator_impl.h [modify] https://crrev.com/6048bc84b1a6dedb7d5bcb6f329500af962a9ad1/services/identity/public/cpp/primary_account_mutator_unittest.cc
,
Nov 28
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by sdefresne@chromium.org
, Nov 16