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

Unified Diff: blimp/client/app/android/javatests/src/org/chromium/blimp/BlimpNativeInstrumentationTestCase.java

Issue 2247143004: Remove app context init from LibraryLoader. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing setUp calls. 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: blimp/client/app/android/javatests/src/org/chromium/blimp/BlimpNativeInstrumentationTestCase.java
diff --git a/blimp/client/app/android/javatests/src/org/chromium/blimp/BlimpNativeInstrumentationTestCase.java b/blimp/client/app/android/javatests/src/org/chromium/blimp/BlimpNativeInstrumentationTestCase.java
index 179138e52bbd0cf98b66653c00211616082f17fb..58da59cbd3201f25604e544305a93cd558abf309 100644
--- a/blimp/client/app/android/javatests/src/org/chromium/blimp/BlimpNativeInstrumentationTestCase.java
+++ b/blimp/client/app/android/javatests/src/org/chromium/blimp/BlimpNativeInstrumentationTestCase.java
@@ -4,8 +4,10 @@
package org.chromium.blimp;
+import android.content.Context;
import android.test.InstrumentationTestCase;
+import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.library_loader.ProcessInitException;
@@ -24,9 +26,13 @@ public class BlimpNativeInstrumentationTestCase extends InstrumentationTestCase
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
+ Context appContext =
+ getInstrumentation().getTargetContext().getApplicationContext();
+ ContextUtils.initApplicationContext(appContext);
try {
- BlimpLibraryLoader.startAsync(getInstrumentation().getTargetContext(),
+ BlimpLibraryLoader.startAsync(appContext,
new BlimpLibraryLoader.Callback() {
+ @Override
public void onStartupComplete(boolean success) {
mSuccess = success;
mNativeReadySemaphore.release();

Powered by Google App Engine
This is Rietveld 408576698