Commit 434f2e67 authored by Thomas Tangl's avatar Thomas Tangl Committed by Commit Bot

[profile-menu] Fix flaky test with unconsented primary account

This is a follow up to crrev.com/c/1840171.

MakeAccountAvailableWithCookies is used for setting
the unconsented primary account, because it waits for
the account to be propagated.

TBR=treib@chromium.org

Bug: 995720
Change-Id: I6b063eb427e5719aa2fec8d2534c67de63ee82ab
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1846271Reviewed-by: default avatarThomas Tangl <tangltom@chromium.org>
Commit-Queue: Thomas Tangl <tangltom@chromium.org>
Cr-Commit-Position: refs/heads/master@{#703469}
parent 6922ba7f
...@@ -876,8 +876,9 @@ constexpr ProfileMenuView::ActionableItem ...@@ -876,8 +876,9 @@ constexpr ProfileMenuView::ActionableItem
IN_PROC_BROWSER_TEST_P(ProfileMenuClickTest_WithUnconsentedPrimaryAccount, IN_PROC_BROWSER_TEST_P(ProfileMenuClickTest_WithUnconsentedPrimaryAccount,
SetupAndRunTest) { SetupAndRunTest) {
secondary_account_helper::SignInSecondaryAccount( signin::MakeAccountAvailableWithCookies(identity_manager(),
browser()->profile(), &test_url_loader_factory_, "user@example.com"); &test_url_loader_factory_,
"user@example.com", "gaia_id");
// Check that the setup was successful. // Check that the setup was successful.
ASSERT_FALSE(identity_manager()->HasPrimaryAccount()); ASSERT_FALSE(identity_manager()->HasPrimaryAccount());
ASSERT_TRUE(identity_manager()->HasUnconsentedPrimaryAccount()); ASSERT_TRUE(identity_manager()->HasUnconsentedPrimaryAccount());
......
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