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

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: Better formatting. Created 4 years, 3 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..eca9b47b1765bde8fa393d7260d657f0fc81ae0b 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
@@ -6,6 +6,7 @@ package org.chromium.blimp;
import android.test.InstrumentationTestCase;
+import org.chromium.base.ContextUtils;
import org.chromium.base.ThreadUtils;
import org.chromium.base.library_loader.ProcessInitException;
@@ -24,14 +25,16 @@ public class BlimpNativeInstrumentationTestCase extends InstrumentationTestCase
ThreadUtils.runOnUiThreadBlocking(new Runnable() {
@Override
public void run() {
+ ContextUtils.initApplicationContext(
+ getInstrumentation().getTargetContext().getApplicationContext());
try {
- BlimpLibraryLoader.startAsync(getInstrumentation().getTargetContext(),
- new BlimpLibraryLoader.Callback() {
- public void onStartupComplete(boolean success) {
- mSuccess = success;
- mNativeReadySemaphore.release();
- }
- });
+ BlimpLibraryLoader.startAsync(new BlimpLibraryLoader.Callback() {
+ @Override
+ public void onStartupComplete(boolean success) {
+ mSuccess = success;
+ mNativeReadySemaphore.release();
+ }
+ });
} catch (ProcessInitException e) {
throw new RuntimeException("Failed to initialize process.");
}

Powered by Google App Engine
This is Rietveld 408576698