Commit 3fe858fe authored by Alice Wang's avatar Alice Wang Committed by Commit Bot

[Android][Test] Batch AccountManagerFacadeTest

This CL batches AccountManagerFacadeTest.

Bug: 1120258
Change-Id: I8dd38caa05b3d689b022d2e1f14ac959b346f51a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2398479Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Alice Wang <aliceywang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805391}
parent 0d0fc829
...@@ -12,12 +12,14 @@ import android.support.test.InstrumentationRegistry; ...@@ -12,12 +12,14 @@ import android.support.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest; import androidx.test.filters.SmallTest;
import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.chromium.base.ThreadUtils; import org.chromium.base.ThreadUtils;
import org.chromium.base.test.BaseJUnit4ClassRunner; import org.chromium.base.test.BaseJUnit4ClassRunner;
import org.chromium.base.test.util.Batch;
import org.chromium.components.signin.AccountManagerDelegateException; import org.chromium.components.signin.AccountManagerDelegateException;
import org.chromium.components.signin.AccountManagerFacadeImpl; import org.chromium.components.signin.AccountManagerFacadeImpl;
import org.chromium.components.signin.AccountManagerFacadeProvider; import org.chromium.components.signin.AccountManagerFacadeProvider;
...@@ -29,8 +31,9 @@ import java.util.concurrent.CountDownLatch; ...@@ -29,8 +31,9 @@ import java.util.concurrent.CountDownLatch;
* Tests for {@link AccountManagerFacade}. See also {@link AccountManagerFacadeRobolectricTest}. * Tests for {@link AccountManagerFacade}. See also {@link AccountManagerFacadeRobolectricTest}.
*/ */
@RunWith(BaseJUnit4ClassRunner.class) @RunWith(BaseJUnit4ClassRunner.class)
@Batch(Batch.UNIT_TESTS)
public class AccountManagerFacadeTest { public class AccountManagerFacadeTest {
private FakeAccountManagerDelegate mDelegate = private final FakeAccountManagerDelegate mDelegate =
new FakeAccountManagerDelegate(FakeAccountManagerDelegate.ENABLE_BLOCK_GET_ACCOUNTS); new FakeAccountManagerDelegate(FakeAccountManagerDelegate.ENABLE_BLOCK_GET_ACCOUNTS);
@Before @Before
...@@ -41,6 +44,11 @@ public class AccountManagerFacadeTest { ...@@ -41,6 +44,11 @@ public class AccountManagerFacadeTest {
}); });
} }
@After
public void tearDown() {
AccountManagerFacadeProvider.resetInstanceForTests();
}
@Test @Test
@SmallTest @SmallTest
public void testIsCachePopulated() throws AccountManagerDelegateException { public void testIsCachePopulated() throws AccountManagerDelegateException {
......
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