Chromium Code Reviews| Index: chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackupAgentTest.java |
| diff --git a/chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackupAgentTest.java b/chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackupAgentTest.java |
| index 57cdb71e720bcfdbb207a600ebbf5b0161222dba..33235578782d0dcf936bd39376a5eafd17170bca 100644 |
| --- a/chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackupAgentTest.java |
| +++ b/chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackupAgentTest.java |
| @@ -20,7 +20,7 @@ import org.chromium.testing.local.LocalRobolectricTestRunner; |
| import org.junit.Before; |
| import org.junit.Test; |
| import org.junit.runner.RunWith; |
| -import org.robolectric.Robolectric; |
| +import org.robolectric.RuntimeEnvironment; |
| import org.robolectric.annotation.Config; |
| import java.io.ByteArrayInputStream; |
| @@ -46,7 +46,7 @@ public class ChromeBackupAgentTest { |
| ChromeTestBackupAgent(byte[] mChromeInputPrefs) { |
| // This is protected in ContextWrapper, so can only be called within a derived |
| // class. |
| - attachBaseContext(Robolectric.application); |
| + attachBaseContext(RuntimeEnvironment.application); |
| mInputStream = new ByteArrayInputStream(mChromeInputPrefs); |
| mOutputStream = new ByteArrayOutputStream(); |
| } |
| @@ -79,9 +79,9 @@ public class ChromeBackupAgentTest { |
| @Before |
| public void setUp() throws Exception { |
| - ContextUtils.initApplicationContextForTests(Robolectric.application); |
| - AccountManager manager = |
| - (AccountManager) Robolectric.application.getSystemService(Context.ACCOUNT_SERVICE); |
| + ContextUtils.initApplicationContextForTests(RuntimeEnvironment.application); |
| + AccountManager manager = (AccountManager) RuntimeEnvironment |
|
jbudorick
2016/08/01 13:52:04
nit: not crazy about this line split.
mikecase (-- gone --)
2016/08/02 06:12:26
Changed it to a line split you will be absolutely
|
| + .application.getSystemService(Context.ACCOUNT_SERVICE); |
| manager.addAccountExplicitly(new Account("user1", "dummy"), null, null); |
| manager.addAccountExplicitly(new Account("user2", "dummy"), null, null); |
| } |