| 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 9adf51bdda16ff8b8971445e3ecee571066ef64c..5dee06e78514ba42791bf1e720d0e1fd3e5ace6a 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
|
| @@ -4,8 +4,10 @@
|
|
|
| package org.chromium.content.browser;
|
|
|
| +import android.content.Context;
|
| 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.content.browser.InterfaceRegistry.ImplementationFactory;
|
| @@ -29,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 {
|
| @@ -97,8 +99,9 @@ public class InterfaceRegistryTest extends ContentShellTestBase {
|
| @Override
|
| protected void setUp() throws Exception {
|
| super.setUp();
|
| - LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized(
|
| - getInstrumentation().getTargetContext());
|
| + Context appContext = getInstrumentation().getTargetContext().getApplicationContext();
|
| + ContextUtils.initApplicationContext(appContext);
|
| + LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized(appContext);
|
| launchContentShellWithUrl("about://blank");
|
| mNativeTestEnvironment = ShellMojoTestUtils.setupTestEnvironment();
|
| }
|
|
|