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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/InterfaceRegistryTest.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: content/public/android/javatests/src/org/chromium/content/browser/InterfaceRegistryTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/InterfaceRegistryTest.java b/content/public/android/javatests/src/org/chromium/content/browser/InterfaceRegistryTest.java
index e8dfa680eb81fed51b487d40771fdc8990ff2ea3..7f73a02d72ee94bfed45ff947277eef34e55059f 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/InterfaceRegistryTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/InterfaceRegistryTest.java
@@ -6,6 +6,7 @@ package org.chromium.content.browser;
import android.test.suitebuilder.annotation.SmallTest;
+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.RetryOnFailure;
@@ -30,7 +31,7 @@ public class InterfaceRegistryTest extends ContentShellTestBase {
private static final long RUN_LOOP_TIMEOUT_MS = 25;
- private final List<Closeable> mCloseablesToClose = new ArrayList<Closeable>();
+ private final List<Closeable> mCloseablesToClose = new ArrayList<>();
private long mNativeTestEnvironment;
static class CalcConnectionErrorHandler implements ConnectionErrorHandler {
@@ -98,8 +99,9 @@ public class InterfaceRegistryTest extends ContentShellTestBase {
@Override
protected void setUp() throws Exception {
super.setUp();
- LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized(
- getInstrumentation().getTargetContext());
+ ContextUtils.initApplicationContext(
+ getInstrumentation().getTargetContext().getApplicationContext());
+ LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized();
launchContentShellWithUrl("about://blank");
mNativeTestEnvironment = ShellMojoTestUtils.setupTestEnvironment();
}

Powered by Google App Engine
This is Rietveld 408576698