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

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

Issue 2239003002: Revert of [Android] 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 f28848fd9dc3943c036d94e69f69ff40381c7f82..57cdb71e720bcfdbb207a600ebbf5b0161222dba 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.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
-import org.robolectric.RuntimeEnvironment;
+import org.robolectric.Robolectric;
import org.robolectric.annotation.Config;
import java.io.ByteArrayInputStream;
@@ -46,7 +46,7 @@
ChromeTestBackupAgent(byte[] mChromeInputPrefs) {
// This is protected in ContextWrapper, so can only be called within a derived
// class.
- attachBaseContext(RuntimeEnvironment.application);
+ attachBaseContext(Robolectric.application);
mInputStream = new ByteArrayInputStream(mChromeInputPrefs);
mOutputStream = new ByteArrayOutputStream();
}
@@ -79,9 +79,9 @@
@Before
public void setUp() throws Exception {
- ContextUtils.initApplicationContextForTests(RuntimeEnvironment.application);
- AccountManager manager = (AccountManager) RuntimeEnvironment.application.getSystemService(
- Context.ACCOUNT_SERVICE);
+ ContextUtils.initApplicationContextForTests(Robolectric.application);
+ AccountManager manager =
+ (AccountManager) Robolectric.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