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 30d5a8d871bb553cbeb222c1018efb0b2b2110e7..0e0bce31304d882ffe9c4e9b8227c73aba0842c9 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 |
@@ -1092,9 +1092,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()); |
+ } |
+ }); |
} |
/** |
@@ -1115,9 +1119,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()); |
+ } |
+ }); |
} |
/** |
@@ -1137,9 +1145,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()); |
+ } |
+ }); |
} |
/** |