| Index: content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java
|
| diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java
|
| index c705563ba8938f75b2f8dd55019b300fee8e0520..c15a5d74c19c8c71fd499d693890c25395aef623 100644
|
| --- a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java
|
| +++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java
|
| @@ -1773,13 +1773,14 @@ public class ContentViewGestureHandlerTest extends InstrumentationTestCase {
|
| }
|
|
|
| /**
|
| - * Verify that no double tap gestures are created if the page has a fixed
|
| - * page scale.
|
| + * Verify that no double tap gestures are created if the gesture handler is
|
| + * told to disable double tap gesture detection (according to the logic in
|
| + * ContentViewCore.onRenderCoordinatesUpdated).
|
| * @throws Exception
|
| */
|
| @SmallTest
|
| @Feature({"Gestures"})
|
| - public void testNoDoubleTapWhenPageScaleFixed() throws Exception {
|
| + public void testNoDoubleTapWhenDoubleTapDisabled() throws Exception {
|
| final long downTime = SystemClock.uptimeMillis();
|
| final long eventTime = SystemClock.uptimeMillis();
|
|
|
| @@ -1788,7 +1789,7 @@ public class ContentViewGestureHandlerTest extends InstrumentationTestCase {
|
| mGestureHandler = new ContentViewGestureHandler(
|
| getInstrumentation().getTargetContext(), mockDelegate, mMockZoomManager,
|
| ContentViewCore.INPUT_EVENTS_DELIVERED_AT_VSYNC);
|
| - mGestureHandler.updateHasFixedPageScale(true);
|
| + mGestureHandler.updateShouldDisableDoubleTap(true);
|
|
|
| MotionEvent event = MotionEvent.obtain(
|
| downTime, downTime, MotionEvent.ACTION_DOWN,
|
| @@ -1827,14 +1828,15 @@ public class ContentViewGestureHandlerTest extends InstrumentationTestCase {
|
| }
|
|
|
| /**
|
| - * Verify that double tap drag zoom feature is not invoked
|
| - * when the page scale is fixed. The second tap sequence should be
|
| - * treated just as the first would be.
|
| + * Verify that double tap drag zoom feature is not invoked when the gesture
|
| + * handler is told to disable double tap gesture detection (according to the
|
| + * logic in ContentViewCore.onRenderCoordinatesUpdated).
|
| + * The second tap sequence should be treated just as the first would be.
|
| * @throws Exception
|
| */
|
| @SmallTest
|
| @Feature({"Gestures"})
|
| - public void testNoDoubleTapDragZoomWhenPageScaleFixed() throws Exception {
|
| + public void testNoDoubleTapDragZoomWhenDoubleTapDisabled() throws Exception {
|
| final long downTime1 = SystemClock.uptimeMillis();
|
| final long downTime2 = downTime1 + 100;
|
|
|
| @@ -1843,7 +1845,7 @@ public class ContentViewGestureHandlerTest extends InstrumentationTestCase {
|
| mGestureHandler = new ContentViewGestureHandler(
|
| getInstrumentation().getTargetContext(), mockDelegate, mMockZoomManager,
|
| ContentViewCore.INPUT_EVENTS_DELIVERED_AT_VSYNC);
|
| - mGestureHandler.updateHasFixedPageScale(true);
|
| + mGestureHandler.updateShouldDisableDoubleTap(true);
|
|
|
| MotionEvent event = motionEvent(MotionEvent.ACTION_DOWN, downTime1, downTime1);
|
| assertTrue(mGestureHandler.onTouchEvent(event));
|
|
|