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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java

Issue 2693893006: android: Don't wait for warm up connection (Closed)
Patch Set: test only Created 3 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
index 2b782cf5f30f0b2cc4cdadda44d4c26a81263a1a..276547534550a2561e139d1890a67475f1a2fcbc 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ChildProcessLauncherTest.java
@@ -444,6 +444,21 @@ public class ChildProcessLauncherTest extends InstrumentationTestCase {
assertTrue(retryConn.getService().bindToCaller());
}
+ @MediumTest
+ @Feature({"ProcessManagement"})
+ public void testWarmUp() {
+ Context context = getInstrumentation().getTargetContext();
+ ChildProcessLauncher.warmUp(context); // Not on UI thread.
+ assertEquals(1, allocatedChromeSandboxedConnectionsCount());
+
+ final ChildProcessConnection conn = ChildProcessLauncher.startForTesting(context,
+ new String[0], new FileDescriptorInfo[0],
+ getDefaultChildProcessCreationParams(context.getPackageName()));
+ assertEquals(1, allocatedChromeSandboxedConnectionsCount()); // Used warmup connection.
+
+ ChildProcessLauncher.stop(conn.getPid());
+ }
+
private ChildProcessConnectionImpl startConnection() {
// Allocate a new connection.
Context context = getInstrumentation().getTargetContext();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698