Commit ec9bd043 authored by Tanmoy Mollik's avatar Tanmoy Mollik Committed by Commit Bot

[Android] Add test for AccountManagementFragment

Test that signed in account is shown at the top of the list of accounts
in AccountManagementFragment page.

Bug: 1105800
Change-Id: I4990400862acf4b794f205062b47acc46365fbb7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2465747Reviewed-by: default avatarMarc Treib <treib@chromium.org>
Commit-Queue: Tanmoy Mollik <triploblastic@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816609}
parent c80a0552
......@@ -44,8 +44,6 @@ public class AccountManagementFragmentTest {
@Before
public void setUp() {
mActivityTestRule.startMainActivityOnBlankPage();
mAccountManagerTestRule.addTestAccountThenSigninAndEnableSync();
mSettingsActivityTestRule.startSettingsActivity();
}
@Test
......@@ -53,6 +51,8 @@ public class AccountManagementFragmentTest {
@Feature("RenderTest")
@Features.DisableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testAccountManagementFragmentViewLegacy() throws Exception {
mAccountManagerTestRule.addTestAccountThenSigninAndEnableSync();
mSettingsActivityTestRule.startSettingsActivity();
mRenderTestRule.render(mSettingsActivityTestRule.getFragment().getView(),
"account_management_fragment_view_legacy");
}
......@@ -62,7 +62,21 @@ public class AccountManagementFragmentTest {
@Feature("RenderTest")
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testAccountManagementFragmentView() throws Exception {
mAccountManagerTestRule.addTestAccountThenSigninAndEnableSync();
mSettingsActivityTestRule.startSettingsActivity();
mRenderTestRule.render(mSettingsActivityTestRule.getFragment().getView(),
"account_management_fragment_view");
}
@Test
@MediumTest
@Feature("RenderTest")
@Features.EnableFeatures(ChromeFeatureList.MOBILE_IDENTITY_CONSISTENCY)
public void testSignedInAccountShownOnTop() throws Exception {
mAccountManagerTestRule.addAccount("testSecondary@gmail.com");
mAccountManagerTestRule.addTestAccountThenSigninAndEnableSync();
mSettingsActivityTestRule.startSettingsActivity();
mRenderTestRule.render(mSettingsActivityTestRule.getFragment().getView(),
"account_management_fragment_signed_in_account_on_top");
}
}
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