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

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

Issue 2611323002: Relanding "Multiprocess test client: Android child process launcher rework." (Closed)
Patch Set: Addressed nyquist@'s comment + sync Created 3 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/native_test/java/src/org/chromium/native_test/MainRunner.java
diff --git a/testing/android/native_test/java/src/org/chromium/native_test/MainRunner.java b/testing/android/native_test/java/src/org/chromium/native_test/MainRunner.java
new file mode 100644
index 0000000000000000000000000000000000000000..94aaeef126e242e4c740b50cd137089fa180a24a
--- /dev/null
+++ b/testing/android/native_test/java/src/org/chromium/native_test/MainRunner.java
@@ -0,0 +1,27 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+package org.chromium.native_test;
+
+import org.chromium.base.annotations.JNINamespace;
+
+/**
+ * This class provides a way to run the native main method.
+ * It is used in the multi-process test case, so that the child process can call
+ * the main method without //base/test:test_support's linkage requiring the
+ * main() symbol.
+ */
+@JNINamespace("testing::android")
+public final class MainRunner {
+ // Prevent instanciation.
+ private MainRunner() {
+ }
+
+ // Maps the file descriptors and executes the main method with the passed in command line.
+ public static int runMain(String[] commandLine, int[] fdsToMapKeys, int[] fdsToMapFds) {
+ return nativeRunMain(commandLine, fdsToMapKeys, fdsToMapFds);
+ }
+ private static native int nativeRunMain(
+ String[] commandLine, int[] fdsToMapKeys, int[] fdsToMapFds);
+}
« no previous file with comments | « testing/android/native_test/java/AndroidManifest.xml.jinja2 ('k') | testing/android/native_test/main_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698