Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3207)

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/util/FeatureUtilitiesTest.java

Issue 2845113003: Rename MockAccountManager to FakeAccountManagerDelegate (Closed)
Patch Set: Addressed comments Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/android/javatests/src/org/chromium/chrome/browser/util/FeatureUtilitiesTest.java
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/util/FeatureUtilitiesTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/util/FeatureUtilitiesTest.java
index 0a3581003c038215bb715ed88c0c0ca5ddc9e66f..fdf6d6f4c28eec697670d18937679b453fbf93ad 100644
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/util/FeatureUtilitiesTest.java
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/util/FeatureUtilitiesTest.java
@@ -26,7 +26,7 @@ import org.chromium.base.test.util.AdvancedMockContext;
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.components.signin.AccountManagerHelper;
-import org.chromium.components.signin.test.util.MockAccountManager;
+import org.chromium.components.signin.test.util.FakeAccountManagerDelegate;
import java.util.ArrayList;
import java.util.List;
@@ -39,7 +39,7 @@ import java.util.concurrent.Callable;
public class FeatureUtilitiesTest {
private IntentTestMockContext mContextWithSpeech;
private IntentTestMockContext mContextWithoutSpeech;
- private MockAuthenticationAccountManager mAccountManager;
+ private FakeAuthenticationAccountManager mAccountManager;
private AdvancedMockContext mAccountTestingContext;
private Account mTestAccount;
@@ -105,13 +105,12 @@ public class FeatureUtilitiesTest {
}
}
- private static class MockAuthenticationAccountManager extends MockAccountManager {
-
+ private static class FakeAuthenticationAccountManager extends FakeAccountManagerDelegate {
private final String mAccountType;
- public MockAuthenticationAccountManager(Context localContext, Context testContext,
- String accountType, Account... accounts) {
- super(localContext, testContext, accounts);
+ public FakeAuthenticationAccountManager(
+ Context localContext, String accountType, Account... accounts) {
+ super(localContext, accounts);
mAccountType = accountType;
}
@@ -151,13 +150,11 @@ public class FeatureUtilitiesTest {
}
private void setUpAccount(final String accountType) {
- mAccountManager = new MockAuthenticationAccountManager(mAccountTestingContext,
- InstrumentationRegistry.getInstrumentation().getContext(), accountType,
- mTestAccount);
+ mAccountManager = new FakeAuthenticationAccountManager(
+ mAccountTestingContext, accountType, mTestAccount);
AccountManagerHelper.overrideAccountManagerHelperForTests(
- mAccountTestingContext,
- mAccountManager);
+ mAccountTestingContext, mAccountManager);
}
@Test

Powered by Google App Engine
This is Rietveld 408576698