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

Side by Side Diff: content/public/android/java/src/org/chromium/content/browser/ChildProcessLauncher.java

Issue 2076583002: Add WebAPK's tests in ChildProcessLauncherTest. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test failures. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.annotation.SuppressLint; 7 import android.annotation.SuppressLint;
8 import android.app.Service; 8 import android.app.Service;
9 import android.content.Context; 9 import android.content.Context;
10 import android.content.Intent; 10 import android.content.Intent;
(...skipping 961 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 Log.w(TAG, "%s, pid=%d", message, pid); 972 Log.w(TAG, "%s, pid=%d", message, pid);
973 } 973 }
974 } 974 }
975 975
976 @VisibleForTesting 976 @VisibleForTesting
977 static ChildProcessConnection allocateBoundConnectionForTesting(Context cont ext, 977 static ChildProcessConnection allocateBoundConnectionForTesting(Context cont ext,
978 ChildProcessCreationParams creationParams) { 978 ChildProcessCreationParams creationParams) {
979 return allocateBoundConnection(context, null, true, false, creationParam s); 979 return allocateBoundConnection(context, null, true, false, creationParam s);
980 } 980 }
981 981
982 @VisibleForTesting
983 static ChildProcessConnection allocateConnectionForTesting(Context context,
984 ChildProcessCreationParams creationParams) {
985 return allocateConnection(
986 context, true, getLinkerParamsForNewConnection(), false, creatio nParams);
987 }
988
982 /** 989 /**
983 * Queue up a spawn requests for testing. 990 * Queue up a spawn requests for testing.
984 */ 991 */
985 @VisibleForTesting 992 @VisibleForTesting
986 static void enqueuePendingSpawnForTesting(Context context, String[] commandL ine, 993 static void enqueuePendingSpawnForTesting(Context context, String[] commandL ine,
987 ChildProcessCreationParams creationParams, boolean inSandbox) { 994 ChildProcessCreationParams creationParams, boolean inSandbox) {
988 String packageName = creationParams != null ? creationParams.getPackageN ame() 995 String packageName = creationParams != null ? creationParams.getPackageN ame()
989 : context.getPackageName(); 996 : context.getPackageName();
990 PendingSpawnQueue pendingSpawnQueue = getPendingSpawnQueue(context, 997 PendingSpawnQueue pendingSpawnQueue = getPendingSpawnQueue(context,
991 packageName, inSandbox); 998 packageName, inSandbox);
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 } 1050 }
1044 1051
1045 return true; 1052 return true;
1046 } 1053 }
1047 1054
1048 private static native void nativeOnChildProcessStarted(long clientContext, i nt pid); 1055 private static native void nativeOnChildProcessStarted(long clientContext, i nt pid);
1049 private static native void nativeEstablishSurfacePeer( 1056 private static native void nativeEstablishSurfacePeer(
1050 int pid, Surface surface, int primaryID, int secondaryID); 1057 int pid, Surface surface, int primaryID, int secondaryID);
1051 private static native boolean nativeIsSingleProcess(); 1058 private static native boolean nativeIsSingleProcess();
1052 } 1059 }
OLDNEW
« no previous file with comments | « no previous file | content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698