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

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

Issue 2254063003: Reland of Android: Make the spare renderer accessible to all Chrome tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Pass the WebContents to the observer (for proper destruction). 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 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());
+ }
+ });
}
/**

Powered by Google App Engine
This is Rietveld 408576698