| 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);
|
|
|