OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.native_test; |
| 6 |
| 7 import org.chromium.base.annotations.JNINamespace; |
| 8 |
| 9 /** |
| 10 * This class provides a way to run the native main method. |
| 11 * It is used in the multi-process test case, so that the child process can call |
| 12 * the main method without //base/test:test_support's linkage requiring the |
| 13 * main() symbol. |
| 14 */ |
| 15 @JNINamespace("testing::android") |
| 16 public final class MainRunner { |
| 17 // Prevent instanciation. |
| 18 private MainRunner() { |
| 19 } |
| 20 |
| 21 // Maps the file descriptors and executes the main method with the passed in
command line. |
| 22 public static int runMain(String[] commandLine, int[] fdsToMapKeys, int[] fd
sToMapFds) { |
| 23 return nativeRunMain(commandLine, fdsToMapKeys, fdsToMapFds); |
| 24 } |
| 25 private static native int nativeRunMain( |
| 26 String[] commandLine, int[] fdsToMapKeys, int[] fdsToMapFds); |
| 27 } |
OLD | NEW |