Commit 739deacb authored by Anastasiia Nikolaienko's avatar Anastasiia Nikolaienko Committed by Commit Bot

Account Manager cleanup: remove enabling AM in tests

Account Manager is enabled by default now. Merge
ArcAuthServiceAccountManagerTest to ArcAuthService tests.

Bug: 912537
Change-Id: Icfe560f097a449ed2e6b62c16b13c3c39ca6a8cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1824101Reviewed-by: default avatarKush Sinha <sinhak@chromium.org>
Reviewed-by: default avatarYury Khmel <khmel@chromium.org>
Commit-Queue: Anastasiia Nikolaienko <anastasiian@chromium.org>
Cr-Commit-Position: refs/heads/master@{#701605}
parent 564cf4b9
......@@ -355,6 +355,11 @@ class ArcAuthServiceTest : public InProcessBrowserTest {
auth_service().GetGoogleAccountsInArc(std::move(callback));
}
AccountInfo SetupGaiaAccount(const std::string& email) {
SetAccountAndProfile(user_manager::USER_TYPE_REGULAR);
return SeedAccountInfo(email);
}
void WaitForGoogleAccountsInArcCallback() { run_loop_->RunUntilIdle(); }
Profile* profile() { return profile_.get(); }
......@@ -571,33 +576,8 @@ IN_PROC_BROWSER_TEST_F(ArcAuthServiceTest,
arc_google_accounts()[0]->gaia_id);
}
// Tests that need Chrome OS Account Manager feature to be enabled.
// TODO(crbug.com/912537): Merge them in ArcAuthServiceTest when Account Manager
// is enabled by default on Chrome OS.
class ArcAuthServiceAccountManagerTest : public ArcAuthServiceTest {
public:
ArcAuthServiceAccountManagerTest() = default;
~ArcAuthServiceAccountManagerTest() override = default;
void SetUp() override {
scoped_feature_list_.InitAndEnableFeature(
chromeos::features::kAccountManager);
ArcAuthServiceTest::SetUp();
}
AccountInfo SetupGaiaAccount(const std::string& email) {
SetAccountAndProfile(user_manager::USER_TYPE_REGULAR);
return SeedAccountInfo(email);
}
private:
base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(ArcAuthServiceAccountManagerTest);
};
IN_PROC_BROWSER_TEST_F(
ArcAuthServiceAccountManagerTest,
ArcAuthServiceTest,
PrimaryAccountReauthIsNotAttemptedJustAfterProvisioning) {
SetAccountAndProfile(user_manager::USER_TYPE_REGULAR);
const int initial_num_calls = auth_instance().num_account_upserted_calls();
......@@ -611,7 +591,7 @@ IN_PROC_BROWSER_TEST_F(
EXPECT_EQ(initial_num_calls, auth_instance().num_account_upserted_calls());
}
IN_PROC_BROWSER_TEST_F(ArcAuthServiceAccountManagerTest,
IN_PROC_BROWSER_TEST_F(ArcAuthServiceTest,
UnAuthenticatedAccountsAreNotPropagated) {
const AccountInfo account_info = SetupGaiaAccount(kSecondaryAccountEmail);
......@@ -623,8 +603,7 @@ IN_PROC_BROWSER_TEST_F(ArcAuthServiceAccountManagerTest,
EXPECT_EQ(initial_num_calls, auth_instance().num_account_upserted_calls());
}
IN_PROC_BROWSER_TEST_F(ArcAuthServiceAccountManagerTest,
AccountUpdatesArePropagated) {
IN_PROC_BROWSER_TEST_F(ArcAuthServiceTest, AccountUpdatesArePropagated) {
AccountInfo account_info = SetupGaiaAccount(kSecondaryAccountEmail);
SetInvalidRefreshTokenForAccount(account_info.account_id);
......@@ -639,8 +618,7 @@ IN_PROC_BROWSER_TEST_F(ArcAuthServiceAccountManagerTest,
EXPECT_EQ(kSecondaryAccountEmail, auth_instance().last_upserted_account());
}
IN_PROC_BROWSER_TEST_F(ArcAuthServiceAccountManagerTest,
AccountRemovalsArePropagated) {
IN_PROC_BROWSER_TEST_F(ArcAuthServiceTest, AccountRemovalsArePropagated) {
SetAccountAndProfile(user_manager::USER_TYPE_REGULAR);
SeedAccountInfo(kSecondaryAccountEmail);
......
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