From 7ecd696dffb7121201bdeb813340a07e68666066 Mon Sep 17 00:00:00 2001 From: Doris Ling Date: Fri, 26 May 2017 13:22:13 -0700 Subject: [PATCH] Remove the duplicate test case that is added by auto-merge. Change-Id: I0f2f30eed80ab550c16c64a44407ce0199090550 Fix: 38302246 Test: make RunSettingsRoboTests --- .../accounts/AccountPreferenceControllerTest.java | 36 ---------------------- 1 file changed, 36 deletions(-) diff --git a/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java index 41b83f2b9d..79ea4da049 100644 --- a/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java +++ b/tests/robotests/src/com/android/settings/accounts/AccountPreferenceControllerTest.java @@ -535,42 +535,6 @@ public class AccountPreferenceControllerTest { @Test @Config(shadows = {ShadowAccountManager.class, ShadowContentResolver.class}) - public void onResume_oneNewAccountType_shouldAddOneAccountPreference() { - final List infos = new ArrayList<>(); - infos.add(new UserInfo(1, "user 1", 0)); - infos.add(new UserInfo(2, "user 2", UserInfo.FLAG_MANAGED_PROFILE)); - when(mUserManager.isManagedProfile()).thenReturn(false); - when(mUserManager.isLinkedUser()).thenReturn(false); - when(mUserManager.getProfiles(anyInt())).thenReturn(infos); - - AccessiblePreferenceCategory preferenceGroup = mock(AccessiblePreferenceCategory.class); - when(preferenceGroup.getPreferenceManager()).thenReturn(mock(PreferenceManager.class)); - when(mAccountHelper.createAccessiblePreferenceCategory(any(Context.class))).thenReturn( - preferenceGroup); - - // First time resume will build the UI with no account - mController.onResume(); - - // Add new account - Account[] accounts = {new Account("Acct1", "com.acct1")}; - when(mAccountManager.getAccountsAsUser(2)).thenReturn(accounts); - when(mAccountManager.getAccountsByTypeAsUser(eq("com.acct1"), any(UserHandle.class))) - .thenReturn(accounts); - - AuthenticatorDescription[] authDescs = { - new AuthenticatorDescription("com.acct1", "com.android.settings", - R.string.account_settings_title, 0, 0, 0, false) - }; - when(mAccountManager.getAuthenticatorTypesAsUser(anyInt())).thenReturn(authDescs); - - // Resume should show the newly added account - mController.onResume(); - - verify(preferenceGroup).addPreference(argThat(new PreferenceMatcher("Acct1"))); - } - - @Test - @Config(shadows = {ShadowAccountManager.class, ShadowContentResolver.class}) public void onResume_oneAccountRemoved_shouldRemoveOneAccountPreference() { final List infos = new ArrayList<>(); infos.add(new UserInfo(1, "user 1", 0)); -- 2.11.0