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(); |
} |