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

Unified Diff: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java

Issue 723343002: Update from https://crrev.com/304121 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 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: testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
diff --git a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
index f5d381a2791b94cb50f3add6038b31960421de31..42befe57cb6bd84ad51c5e0d3cfbfada328b6bae 100644
--- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
+++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
@@ -22,6 +22,11 @@ import org.chromium.base.library_loader.NativeLibraries;
* the native activity class loader.
*/
public class ChromeNativeTestActivity extends Activity {
+ public static final String EXTRA_COMMAND_LINE_FILE =
+ "org.chromium.native_test.ChromeNativeTestActivity.CommandLineFile";
+ public static final String EXTRA_COMMAND_LINE_FLAGS =
+ "org.chromium.native_test.ChromeNativeTestActivity.CommandLineFlags";
+
private static final String TAG = "ChromeNativeTestActivity";
private static final String EXTRA_RUN_IN_SUB_THREAD = "RunInSubThread";
// We post a delayed task to run tests so that we do not block onCreate().
@@ -66,8 +71,15 @@ public class ChromeNativeTestActivity extends Activity {
}
private void runTests() {
+ String commandLineFlags = getIntent().getStringExtra(EXTRA_COMMAND_LINE_FLAGS);
+ if (commandLineFlags == null) commandLineFlags = "";
+
+ String commandLineFilePath = getIntent().getStringExtra(EXTRA_COMMAND_LINE_FILE);
+ if (commandLineFilePath == null) commandLineFilePath = "";
+
// This directory is used by build/android/pylib/test_package_apk.py.
- nativeRunTests(getFilesDir().getAbsolutePath(), getApplicationContext());
+ nativeRunTests(commandLineFlags, commandLineFilePath, getFilesDir().getAbsolutePath(),
+ getApplicationContext());
}
// Signal a failure of the native test loader to python scripts
@@ -85,5 +97,6 @@ public class ChromeNativeTestActivity extends Activity {
}
}
- private native void nativeRunTests(String filesDir, Context appContext);
+ private native void nativeRunTests(String commandLineFlags, String commandLineFilePath,
+ String filesDir, Context appContext);
}

Powered by Google App Engine
This is Rietveld 408576698