| Index: android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
|
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
|
| index d26b7558674b60522bb75ab3c9044ba4bb576d90..f8207dd2f0e80725faeb456dc6f62a418dd2eaac 100644
|
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
|
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientShouldInterceptRequestTest.java
|
| @@ -4,8 +4,6 @@
|
|
|
| package org.chromium.android_webview.test;
|
|
|
| -import android.graphics.Bitmap;
|
| -import android.graphics.Color;
|
| import android.os.Build;
|
| import android.test.suitebuilder.annotation.SmallTest;
|
| import android.util.Pair;
|
| @@ -14,7 +12,6 @@ import org.chromium.android_webview.AwContents;
|
| import org.chromium.android_webview.AwWebResourceResponse;
|
| import org.chromium.android_webview.test.util.AwTestTouchUtils;
|
| import org.chromium.android_webview.test.util.CommonResources;
|
| -import org.chromium.android_webview.test.util.GraphicsTestUtils;
|
| import org.chromium.android_webview.test.util.JSUtils;
|
| import org.chromium.base.test.util.Feature;
|
| import org.chromium.base.test.util.MinAndroidSdkLevel;
|
| @@ -242,21 +239,8 @@ public class AwContentsClientShouldInterceptRequestTest extends AwTestBase {
|
| assertEquals(false,
|
| mShouldInterceptRequestHelper.getRequestsForUrl(pageWithLinkUrl).hasUserGesture);
|
|
|
| - // TODO(mkosiba): Remove this once we have a real API to wait for the page to load and
|
| - // display.
|
| - // http://crbug.com/364612
|
| - //
|
| - // The code here is waiting for the "link" (which is a full-screen blue div) to appear on
|
| - // screen.
|
| - pollOnUiThread(new Callable<Boolean>() {
|
| - @Override
|
| - public Boolean call() throws Exception {
|
| - Bitmap bitmap = GraphicsTestUtils.drawAwContents(mAwContents, 2, 2,
|
| - -(float) mTestContainerView.getWidth() / 2,
|
| - -(float) mTestContainerView.getHeight() / 2);
|
| - return bitmap.getPixel(0, 0) == Color.BLUE;
|
| - }
|
| - });
|
| + waitForPixelColorAtCenterOfView(mAwContents,
|
| + mTestContainerView, CommonResources.LINK_COLOR);
|
| callCount = mShouldInterceptRequestHelper.getCallCount();
|
| AwTestTouchUtils.simulateTouchCenterOfView(mTestContainerView);
|
| mShouldInterceptRequestHelper.waitForCallback(callCount);
|
|
|