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

Unified Diff: components/variations/android/junit/src/org/chromium/components/variations/firstrun/VariationsSeedFetcherTest.java

Issue 2710343003: Update Robolectric to 3.2.2 (Closed)
Patch Set: Update Robolectric to 3.2 Created 3 years, 9 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: components/variations/android/junit/src/org/chromium/components/variations/firstrun/VariationsSeedFetcherTest.java
diff --git a/components/variations/android/junit/src/org/chromium/components/variations/firstrun/VariationsSeedFetcherTest.java b/components/variations/android/junit/src/org/chromium/components/variations/firstrun/VariationsSeedFetcherTest.java
index 9c725103ddb9e6a058187904d2b46a9aa073cac0..1835e1ea53347109705da60f0c910198870c1baf 100644
--- a/components/variations/android/junit/src/org/chromium/components/variations/firstrun/VariationsSeedFetcherTest.java
+++ b/components/variations/android/junit/src/org/chromium/components/variations/firstrun/VariationsSeedFetcherTest.java
@@ -24,6 +24,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
+import org.robolectric.RuntimeEnvironment;
import org.robolectric.annotation.Config;
import org.chromium.base.ContextUtils;
@@ -46,6 +47,7 @@ public class VariationsSeedFetcherTest {
@Before
public void setUp() throws IOException {
+ ContextUtils.initApplicationContextForTests(RuntimeEnvironment.application);
mikecase (-- gone --) 2017/03/07 20:29:41 Adding this fixed some errors when running the tes
jwd 2017/03/08 22:44:33 What does this line do? The robolectric doc on Run
mikecase (-- gone --) 2017/03/09 01:50:28 I think RuntimeEnvironment.application is just how
jwd 2017/03/09 15:16:31 Ok, seems fine to add it. The test shouldn't be af
// Pretend we are not on the UI thread, since the class we are testing is supposed to run
// only on a background thread.
ThreadUtils.setUiThread(mock(Looper.class));

Powered by Google App Engine
This is Rietveld 408576698