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 7e08d1ea0d8179ed27747d12859b198cd54960c9..ae5f9dfaeae11854a1254e2f1332273a097a13b7 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 |
@@ -445,7 +445,13 @@ public class ChildProcessLauncherTest extends InstrumentationTestCase { |
assertFalse(conn.getService().bindToCaller()); |
assertEquals(1, retryConn.getServiceNumber()); |
- assertTrue(retryConn.getPid() > 0); |
+ CriteriaHelper.pollInstrumentationThread( |
+ new Criteria("Failed waiting retry connection to get pid") { |
+ @Override |
+ public boolean isSatisfied() { |
+ return retryConn.getPid() > 0; |
+ } |
+ }); |
assertTrue(retryConn.getPid() != helperConnPid); |
assertTrue(retryConn.getService().bindToCaller()); |
} |