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

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

Issue 866183002: Roll Chrome into Mojo. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 11 months 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 d476cbcc0198c108d28f30597a3fe6be626ac3b2..4aafa7cdb5c9b6056fc79d6e09791da86f69cf5f 100644
--- a/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
+++ b/testing/android/java/src/org/chromium/native_test/ChromeNativeTestActivity.java
@@ -29,6 +29,8 @@ public class ChromeNativeTestActivity extends Activity {
"org.chromium.native_test.ChromeNativeTestActivity.CommandLineFile";
public static final String EXTRA_COMMAND_LINE_FLAGS =
"org.chromium.native_test.ChromeNativeTestActivity.CommandLineFlags";
+ public static final String EXTRA_STDOUT_FILE =
+ "org.chromium.native_test.ChromeNativeTestActivity.StdoutFile";
private static final String TAG = "ChromeNativeTestActivity";
private static final String EXTRA_RUN_IN_SUB_THREAD = "RunInSubThread";
@@ -89,9 +91,17 @@ public class ChromeNativeTestActivity extends Activity {
Log.i(TAG, "command line file path: " + commandLineFilePath);
}
+ String stdoutFilePath = getIntent().getStringExtra(EXTRA_STDOUT_FILE);
+ boolean stdoutFifo = false;
+ if (stdoutFilePath == null) {
+ stdoutFilePath = new File(getFilesDir(), "test.fifo").getAbsolutePath();
+ stdoutFifo = true;
+ }
+
// This directory is used by build/android/pylib/test_package_apk.py.
- nativeRunTests(commandLineFlags, commandLineFilePath, getFilesDir().getAbsolutePath(),
+ nativeRunTests(commandLineFlags, commandLineFilePath, stdoutFilePath, stdoutFifo,
getApplicationContext());
+ finish();
}
// Signal a failure of the native test loader to python scripts
@@ -110,5 +120,5 @@ public class ChromeNativeTestActivity extends Activity {
}
private native void nativeRunTests(String commandLineFlags, String commandLineFilePath,
- String filesDir, Context appContext);
+ String stdoutFilePath, boolean stdoutFifo, Context appContext);
}

Powered by Google App Engine
This is Rietveld 408576698