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

Unified Diff: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java

Issue 1786243003: Rename pollForCriteria to pollForTestThreadCriteria. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and update MediaRouterIntegrationTest.java Created 4 years, 9 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: android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
index 2f9ad915b68b57541d796b2aa0984ce8cce6acc9..00352faf1338043dc2fc083079e0b7fb0540f822 100644
--- a/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
+++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwTestBase.java
@@ -341,7 +341,7 @@ public class AwTestBase
// as visual state callback only indicates that *something* has appeared in WebView.
public void waitForPixelColorAtCenterOfView(final AwContents awContents,
final AwTestContainerView testContainerView, final int expectedColor) throws Exception {
- pollOnUiThread(new Callable<Boolean>() {
+ pollUiThread(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
Bitmap bitmap = GraphicsTestUtils.drawAwContents(awContents, 2, 2,
@@ -491,11 +491,12 @@ public class AwTestBase
}
/**
- * Wrapper around CriteriaHelper.pollForCriteria. This uses AwTestBase-specifc timeouts and
- * treats timeouts and exceptions as test failures automatically.
+ * Wrapper around CriteriaHelper.pollInstrumentationThread. This uses AwTestBase-specifc
+ * timeouts and treats timeouts and exceptions as test failures automatically.
*/
- public static void poll(final Callable<Boolean> callable) throws Exception {
- CriteriaHelper.pollForCriteria(new Criteria() {
+ public static void pollInstrumentationThread(final Callable<Boolean> callable)
+ throws Exception {
+ CriteriaHelper.pollInstrumentationThread(new Criteria() {
@Override
public boolean isSatisfied() {
try {
@@ -511,8 +512,8 @@ public class AwTestBase
/**
* Wrapper around {@link AwTestBase#poll()} but runs the callable on the UI thread.
*/
- public void pollOnUiThread(final Callable<Boolean> callable) throws Exception {
- poll(new Callable<Boolean>() {
+ public void pollUiThread(final Callable<Boolean> callable) throws Exception {
+ pollInstrumentationThread(new Callable<Boolean>() {
@Override
public Boolean call() throws Exception {
return runTestOnUiThreadAndGetResult(callable);

Powered by Google App Engine
This is Rietveld 408576698