Index: mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java |
diff --git a/mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java b/mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java |
index 3e81b7a8017b662d7b85f81d57ca6ee083e7bb10..c7348caa2c080d6d4c9cc9b9ce0da2337d0da06e 100644 |
--- a/mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java |
+++ b/mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java |
@@ -4,6 +4,7 @@ |
package org.chromium.mojo; |
+import android.content.Context; |
import android.test.InstrumentationTestCase; |
import org.chromium.base.ContextUtils; |
@@ -25,9 +26,9 @@ public class MojoTestCase extends InstrumentationTestCase { |
@Override |
protected void setUp() throws Exception { |
super.setUp(); |
- LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER) |
- .ensureInitialized(getInstrumentation().getTargetContext()); |
- ContextUtils.initApplicationContext(getInstrumentation().getTargetContext()); |
+ Context appContext = getInstrumentation().getTargetContext().getApplicationContext(); |
+ ContextUtils.initApplicationContext(appContext); |
+ LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER).ensureInitialized(appContext); |
nativeInit(); |
mTestEnvironmentPointer = nativeSetupTestEnvironment(); |
} |