| Index: android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
|
| diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
|
| index 473acd427fb3bc51ea42277acbc038a8ede994bb..ca277ba3037779e8d07a4a3c50d0fa6bc9238f14 100644
|
| --- a/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
|
| +++ b/android_webview/javatests/src/org/chromium/android_webview/test/AndroidScrollIntegrationTest.java
|
| @@ -15,6 +15,7 @@ import org.chromium.android_webview.test.util.CommonResources;
|
| import org.chromium.android_webview.test.util.JavascriptEventObserver;
|
| import org.chromium.base.ThreadUtils;
|
| import org.chromium.base.annotations.SuppressFBWarnings;
|
| +import org.chromium.base.test.util.DisabledTest;
|
| import org.chromium.base.test.util.Feature;
|
| import org.chromium.content.browser.test.util.CallbackHelper;
|
| import org.chromium.content_public.browser.GestureStateListener;
|
| @@ -23,7 +24,6 @@ import org.chromium.ui.gfx.DeviceDisplayInfo;
|
|
|
| import java.util.Locale;
|
| import java.util.concurrent.Callable;
|
| -import java.util.concurrent.CountDownLatch;
|
| import java.util.concurrent.atomic.AtomicBoolean;
|
| import java.util.concurrent.atomic.AtomicInteger;
|
| import java.util.concurrent.atomic.AtomicReference;
|
| @@ -472,8 +472,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
|
| AwTestTouchUtils.dragCompleteView(testContainerView,
|
| 0, -targetScrollXPix, // these need to be negative as we're scrolling down.
|
| 0, -targetScrollYPix,
|
| - dragSteps,
|
| - null /* completionLatch */);
|
| + dragSteps);
|
|
|
| for (int i = 1; i <= dragSteps; ++i) {
|
| onScrollToCallbackHelper.waitForCallback(scrollToCallCount, i);
|
| @@ -487,38 +486,6 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
|
|
|
| @SmallTest
|
| @Feature({"AndroidWebView"})
|
| - public void testNoSpuriousOverScrolls() throws Throwable {
|
| - final TestAwContentsClient contentsClient = new TestAwContentsClient();
|
| - final ScrollTestContainerView testContainerView =
|
| - (ScrollTestContainerView) createAwTestContainerViewOnMainSync(contentsClient);
|
| - enableJavaScriptOnUiThread(testContainerView.getAwContents());
|
| -
|
| - final int dragSteps = 1;
|
| - final int targetScrollYPix = 40;
|
| -
|
| - setMaxScrollOnMainSync(testContainerView, 0, 0);
|
| -
|
| - loadTestPageAndWaitForFirstFrame(testContainerView, contentsClient, null, "");
|
| -
|
| - final CallbackHelper onScrollToCallbackHelper =
|
| - testContainerView.getOnScrollToCallbackHelper();
|
| - final int scrollToCallCount = onScrollToCallbackHelper.getCallCount();
|
| - CountDownLatch scrollingCompleteLatch = new CountDownLatch(1);
|
| - AwTestTouchUtils.dragCompleteView(testContainerView,
|
| - 0, 0, // these need to be negative as we're scrolling down.
|
| - 0, -targetScrollYPix,
|
| - dragSteps,
|
| - scrollingCompleteLatch);
|
| - try {
|
| - scrollingCompleteLatch.await();
|
| - } catch (InterruptedException ex) {
|
| - // ignore
|
| - }
|
| - assertEquals(scrollToCallCount + 1, onScrollToCallbackHelper.getCallCount());
|
| - }
|
| -
|
| - @SmallTest
|
| - @Feature({"AndroidWebView"})
|
| public void testOverScrollX() throws Throwable {
|
| final TestAwContentsClient contentsClient = new TestAwContentsClient();
|
| final ScrollTestContainerView testContainerView =
|
| @@ -538,8 +505,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
|
| AwTestTouchUtils.dragCompleteView(testContainerView,
|
| 0, overScrollDeltaX,
|
| 0, 0,
|
| - oneStep,
|
| - null /* completionLatch */);
|
| + oneStep);
|
| overScrollByCallbackHelper.waitForCallback(overScrollCallCount);
|
| // Unfortunately the gesture detector seems to 'eat' some number of pixels. For now
|
| // checking that the value is < 0 (overscroll is reported as negative values) will have to
|
| @@ -569,8 +535,7 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
|
| AwTestTouchUtils.dragCompleteView(testContainerView,
|
| 0, 0,
|
| 0, overScrollDeltaY,
|
| - oneStep,
|
| - null /* completionLatch */);
|
| + oneStep);
|
| overScrollByCallbackHelper.waitForCallback(overScrollCallCount);
|
| assertEquals(0, overScrollByCallbackHelper.getDeltaX());
|
| assertTrue(0 > overScrollByCallbackHelper.getDeltaY());
|
| @@ -802,13 +767,17 @@ public class AndroidScrollIntegrationTest extends AwTestBase {
|
| AwTestTouchUtils.dragCompleteView(testContainerView,
|
| 0, -targetScrollXPix, // these need to be negative as we're scrolling down.
|
| 0, -targetScrollYPix,
|
| - dragSteps,
|
| - null /* completionLatch */);
|
| + dragSteps);
|
| onScrollUpdateGestureConsumedHelper.waitForCallback(callCount);
|
| }
|
|
|
| + /*
|
| @SmallTest
|
| @Feature({"AndroidWebView"})
|
| + Disabled because zoomIn is no longer synchronous. Fix if it's a compatibility problem.
|
| + See crbug.com/545628.
|
| + */
|
| + @DisabledTest
|
| public void testPinchZoomUpdatesScrollRangeSynchronously() throws Throwable {
|
| final TestAwContentsClient contentsClient = new TestAwContentsClient();
|
| final ScrollTestContainerView testContainerView =
|
|
|