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

Unified Diff: chrome/android/junit/src/org/chromium/chrome/browser/ChromeBackupAgentTest.java

Issue 2243353002: (Reland) Update all Robolectric tests to Robolectric 3.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/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..f28848fd9dc3943c036d94e69f69ff40381c7f82 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.application.getSystemService(
+ Context.ACCOUNT_SERVICE);
manager.addAccountExplicitly(new Account("user1", "dummy"), null, null);
manager.addAccountExplicitly(new Account("user2", "dummy"), null, null);
}

Powered by Google App Engine
This is Rietveld 408576698