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 d8d7b920f51b371dca3fde695e26e7f95dfbc533..0005cab4d2d653b907952e8c168b6e6bcb26d4f2 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.DisabledTest; |
@@ -31,7 +32,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 { |
@@ -99,8 +100,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(); |
} |