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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.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: content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
index 1e712a512c73e5f04882c521ad06e8f652850ba2..364a39ecb2d70340e86fc1be6a8ec76496e7b00e 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
@@ -10,6 +10,7 @@ import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.MediumTest;
import org.chromium.base.BaseSwitches;
+import org.chromium.base.ContextUtils;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.LibraryProcessType;
import org.chromium.base.test.util.CommandLineFlags;
@@ -341,7 +342,8 @@ public class ChildProcessLauncherTest extends InstrumentationTestCase {
@Override
protected void setUp() throws Exception {
super.setUp();
- LibraryLoader.get(LibraryProcessType.PROCESS_CHILD)
- .ensureInitialized(getInstrumentation().getTargetContext());
+ Context appContext = getInstrumentation().getTargetContext().getApplicationContext();
+ ContextUtils.initApplicationContext(appContext);
+ LibraryLoader.get(LibraryProcessType.PROCESS_CHILD).ensureInitialized(appContext);
}
}

Powered by Google App Engine
This is Rietveld 408576698