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

Unified Diff: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestUtils.java

Issue 2882823002: Moving some CPL logic to CPLH. (Closed)
Patch Set: Fixed warm-up and tests. Created 3 years, 7 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
« no previous file with comments | « content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestHelperService.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestUtils.java
diff --git a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestUtils.java b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestUtils.java
index 8bd087cf72d8048e0ea8459d16289ad92de6941a..4bd2678b1aabb5e2514335af9ecf54af50a935e6 100644
--- a/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestUtils.java
+++ b/content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestUtils.java
@@ -10,7 +10,7 @@ import org.chromium.base.process_launcher.ChildProcessCreationParams;
import org.chromium.base.process_launcher.FileDescriptorInfo;
import org.chromium.base.process_launcher.IChildProcessService;
import org.chromium.content.browser.ChildProcessConnection;
-import org.chromium.content.browser.ChildProcessLauncher;
+import org.chromium.content.browser.ChildProcessLauncherHelper;
import org.chromium.content.browser.LauncherThread;
import java.util.concurrent.Callable;
@@ -55,15 +55,25 @@ public final class ChildProcessLauncherTestUtils {
}
}
- public static ChildProcessConnection startInternalForTesting(final Context context,
- final String[] commandLine, final FileDescriptorInfo[] filesToMap,
+ public static ChildProcessLauncherHelper startForTesting(final Context context,
+ final String[] commandLine, final FileDescriptorInfo[] filesToBeMapped,
final ChildProcessCreationParams params) {
+ return runOnLauncherAndGetResult(new Callable<ChildProcessLauncherHelper>() {
+ @Override
+ public ChildProcessLauncherHelper call() {
+ return ChildProcessLauncherHelper.createAndStartForTesting(0L /* nativePointer */,
+ commandLine, filesToBeMapped, params, true /* inSandbox */,
+ false /* alwaysInForeground */);
+ }
+ });
+ }
+
+ public static ChildProcessConnection getConnection(
+ final ChildProcessLauncherHelper childProcessLauncher) {
return runOnLauncherAndGetResult(new Callable<ChildProcessConnection>() {
@Override
public ChildProcessConnection call() {
- return ChildProcessLauncher.startInternal(context, commandLine, filesToMap,
- null /* launchCallback */, null /* childProcessCallback */,
- true /* inSandbox */, false /* alwaysInForeground */, params);
+ return childProcessLauncher.getChildProcessConnection();
}
});
}
« no previous file with comments | « content/shell/android/shell_apk/src/org/chromium/content_shell_apk/ChildProcessLauncherTestHelperService.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698