Commit ceada96f authored by Alan Cutter's avatar Alan Cutter Committed by Commit Bot

Re-enable AccountManagerUIHandlerTest tests

AccountManagerUIHandlerTest tests were disabled in
https://bugs.chromium.org/p/chromium/issues/detail?id=1131834
due to flakiness with ExternalWebAppManager. This is due to
https://chromium-review.googlesource.com/c/chromium/src/+/2423823
altering the behaviour of when
chromeos::ProfileHelper::IsPrimaryProfile() gets called uncovering
an incompatiblity between the profile created by these tests and
IsPrimaryProfile().

This CL disables ExternalWebAppManager's start up flow to avoid
triggering the IsPrimaryProfile() incompatibility so we can
re-enable these tests.

Bug: 1131834
Change-Id: Ia4d15785a64b45689f742d3604c10e1b8502cafd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2434412
Auto-Submit: Alan Cutter <alancutter@chromium.org>
Reviewed-by: default avatarMichael Giuffrida <michaelpg@chromium.org>
Commit-Queue: Alan Cutter <alancutter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811404}
parent c095a2d7
......@@ -14,6 +14,7 @@
#include "chrome/browser/chromeos/profiles/profile_helper.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/supervised_user/supervised_user_constants.h"
#include "chrome/browser/web_applications/external_web_app_manager.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/testing_profile.h"
#include "chromeos/components/account_manager/account_manager.h"
......@@ -126,6 +127,11 @@ class AccountManagerUIHandlerTest
delete;
void SetUpOnMainThread() override {
// Disable preinstalled app scan, it is not compatible with the testing
// profile we create here.
// TODO(crbug.com/1131834): Make it compatible.
web_app::ExternalWebAppManager::SkipStartupForTesting();
user_manager_enabler_ = std::make_unique<user_manager::ScopedUserManager>(
std::make_unique<chromeos::FakeChromeUserManager>());
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
......@@ -226,9 +232,8 @@ class AccountManagerUIHandlerTest
std::unique_ptr<TestingAccountManagerUIHandler> handler_;
};
// TODO(https://crbug.com/1131834): Re-enable flaky test.
IN_PROC_BROWSER_TEST_P(AccountManagerUIHandlerTest,
DISABLED_OnGetAccountsNoSecondaryAccounts) {
OnGetAccountsNoSecondaryAccounts) {
const std::vector<AccountManager::Account> account_manager_accounts =
GetAccountsFromAccountManager();
// Only Primary account.
......@@ -271,9 +276,8 @@ IN_PROC_BROWSER_TEST_P(AccountManagerUIHandlerTest,
}
}
// TODO(https://crbug.com/1131819): Re-enable flaky test.
IN_PROC_BROWSER_TEST_P(AccountManagerUIHandlerTest,
DISABLED_OnGetAccountsWithSecondaryAccounts) {
OnGetAccountsWithSecondaryAccounts) {
UpsertAccount("secondary1@example.com");
UpsertAccount("secondary2@example.com");
const std::vector<AccountManager::Account> account_manager_accounts =
......
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