Index: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java |
diff --git a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java |
index 2e5b34cb231d90f5f8fea76734c6fc6cf2850a83..43680796f087516b5c48c1bb603803b44097d2c8 100644 |
--- a/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java |
+++ b/chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java |
@@ -1061,9 +1061,13 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase { |
} catch (InterruptedException e) { |
fail(); |
} |
- assertFalse( |
- "Warmup() should have allocated a child connection", |
- mActivity.shouldAllocateChildConnection()); |
+ ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
+ @Override |
+ public void run() { |
+ assertFalse("Warmup() should have allocated a child connection", |
+ mActivity.shouldAllocateChildConnection()); |
+ } |
+ }); |
} |
/** |
@@ -1084,9 +1088,13 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase { |
} catch (InterruptedException e) { |
fail(); |
} |
- assertTrue( |
- "No spare renderer available, should allocate a child connection.", |
- mActivity.shouldAllocateChildConnection()); |
+ ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
+ @Override |
+ public void run() { |
+ assertTrue("No spare renderer available, should allocate a child connection.", |
+ mActivity.shouldAllocateChildConnection()); |
+ } |
+ }); |
} |
/** |
@@ -1106,9 +1114,13 @@ public class CustomTabActivityTest extends CustomTabActivityTestBase { |
} catch (InterruptedException e) { |
fail(); |
} |
- assertFalse( |
- "Prerendering should have allocated a child connection", |
- mActivity.shouldAllocateChildConnection()); |
+ ThreadUtils.runOnUiThreadBlocking(new Runnable() { |
+ @Override |
+ public void run() { |
+ assertFalse("Prerendering should have allocated a child connection", |
+ mActivity.shouldAllocateChildConnection()); |
+ } |
+ }); |
} |
/** |