| Index: chrome/android/junit/src/org/chromium/chrome/browser/invalidation/InvalidationControllerTest.java
|
| diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/invalidation/InvalidationControllerTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/invalidation/InvalidationControllerTest.java
|
| index f66bbd13e775c445f5bd4180a5314b2e33861292..0eb75446139305fd2b70767198aa2baea57bff5b 100644
|
| --- a/chrome/android/junit/src/org/chromium/chrome/browser/invalidation/InvalidationControllerTest.java
|
| +++ b/chrome/android/junit/src/org/chromium/chrome/browser/invalidation/InvalidationControllerTest.java
|
| @@ -12,9 +12,9 @@ import android.content.pm.ApplicationInfo;
|
| import android.content.pm.PackageInfo;
|
| import android.os.Bundle;
|
|
|
| -import org.junit.After;
|
| import org.junit.Assert;
|
| import org.junit.Before;
|
| +import org.junit.BeforeClass;
|
| import org.junit.Test;
|
| import org.junit.runner.RunWith;
|
| import org.robolectric.Robolectric;
|
| @@ -93,6 +93,12 @@ public class InvalidationControllerTest {
|
| */
|
| private Set<String> mNonSessionTypes;
|
|
|
| + @BeforeClass
|
| + public static void overrideAccountManagerHelper() {
|
| + AccountManagerHelper.overrideAccountManagerHelperForTests(
|
| + new SystemAccountManagerDelegate());
|
| + }
|
| +
|
| @Before
|
| public void setUp() throws Exception {
|
| Activity activity = Robolectric.buildActivity(Activity.class).setup().get();
|
| @@ -114,9 +120,6 @@ public class InvalidationControllerTest {
|
|
|
| ContextUtils.initApplicationContextForTests(mContext.getApplicationContext());
|
|
|
| - AccountManagerHelper.overrideAccountManagerHelperForTests(
|
| - mContext, new SystemAccountManagerDelegate());
|
| -
|
| ModelTypeHelper.setTestDelegate(new ModelTypeHelper.TestDelegate() {
|
| @Override
|
| public String toNotificationType(int modelType) {
|
| @@ -145,11 +148,6 @@ public class InvalidationControllerTest {
|
| AndroidSyncSettings.enableChromeSync(mContext);
|
| }
|
|
|
| - @After
|
| - public void tearDown() {
|
| - AccountManagerHelper.resetAccountManagerHelperForTests();
|
| - }
|
| -
|
| /**
|
| * Verify the intent sent by InvalidationController#stop().
|
| */
|
|
|