Commit 3e73a551 authored by Sven Zheng's avatar Sven Zheng Committed by Commit Bot

Set passphrase before reset account for kitchensync.

There are some e2e tests which set passphrase. After they run, we can
not reset account because we can not start sync. With this change, account
can correctly sign in after those tests, no matter the account requires
or not the passphrase.

TEST: tested e2e tests can still pass.
Bug: 1010568
Change-Id: I91ddf83fee188c5f6a16f8f97ded482437c21398
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1867470
Commit-Queue: Sven Zheng <svenzheng@chromium.org>
Reviewed-by: default avatarMikel Astiz <mastiz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#709325}
parent 48b00934
......@@ -997,7 +997,12 @@ void SyncTest::ResetSyncForPrimaryAccount() {
int old_use_new_user_data_dir = use_new_user_data_dir_;
use_new_user_data_dir_ = true;
num_clients_ = 1;
SetupSyncInternal(/*setup_mode=*/WAIT_FOR_SYNC_SETUP_TO_COMPLETE);
// Do not wait for sync complete. Some tests set passphrase and sync
// will fail. NO_WAITING mode gives access token and birthday so
// ProfileSyncServiceHarness::ResetSyncForPrimaryAccount() can succeed.
// The passphrase will be reset together with the rest of the sync data
// clearing.
SetupSyncNoWaitingForCompletion();
GetClient(0)->ResetSyncForPrimaryAccount();
GetClient(0)->StopSyncServiceAndClearData();
ClearProfiles();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment