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

Unified Diff: chrome/android/javatests/src/org/chromium/chrome/browser/customtabs/CustomTabActivityTest.java

Issue 2199393002: Android: Make the spare renderer accessible to all Chrome tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 4 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
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());
+ }
+ });
}
/**

Powered by Google App Engine
This is Rietveld 408576698