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

Unified Diff: mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java

Issue 1407233017: Define a Java-side global application context. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Undo changes to ApplicationStatus Created 5 years, 1 month 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: 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 4e96de27f9383c5d6dd10b7a38586328286c2265..3e81b7a8017b662d7b85f81d57ca6ee083e7bb10 100644
--- a/mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java
+++ b/mojo/android/javatests/src/org/chromium/mojo/MojoTestCase.java
@@ -4,9 +4,9 @@
package org.chromium.mojo;
-import android.content.Context;
import android.test.InstrumentationTestCase;
+import org.chromium.base.ContextUtils;
import org.chromium.base.annotations.JNINamespace;
import org.chromium.base.library_loader.LibraryLoader;
import org.chromium.base.library_loader.LibraryProcessType;
@@ -27,7 +27,8 @@ public class MojoTestCase extends InstrumentationTestCase {
super.setUp();
LibraryLoader.get(LibraryProcessType.PROCESS_BROWSER)
.ensureInitialized(getInstrumentation().getTargetContext());
- nativeInitApplicationContext(getInstrumentation().getTargetContext());
+ ContextUtils.initApplicationContext(getInstrumentation().getTargetContext());
+ nativeInit();
mTestEnvironmentPointer = nativeSetupTestEnvironment();
}
@@ -54,7 +55,7 @@ public class MojoTestCase extends InstrumentationTestCase {
nativeRunLoop(0);
}
- private native void nativeInitApplicationContext(Context context);
+ private native void nativeInit();
private native long nativeSetupTestEnvironment();

Powered by Google App Engine
This is Rietveld 408576698