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

Side by Side Diff: content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java

Issue 18850005: Disable double tap zoom on mobile sites, to remove 300ms click delay (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.content.browser; 5 package org.chromium.content.browser;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.Build; 8 import android.os.Build;
9 import android.os.Bundle; 9 import android.os.Bundle;
10 import android.os.SystemClock; 10 import android.os.SystemClock;
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 @Override 109 @Override
110 public boolean didUIStealScroll(float x, float y) { 110 public boolean didUIStealScroll(float x, float y) {
111 // Not implemented. 111 // Not implemented.
112 return false; 112 return false;
113 } 113 }
114 114
115 @Override 115 @Override
116 public void invokeZoomPicker() { 116 public void invokeZoomPicker() {
117 // Not implemented. 117 // Not implemented.
118 } 118 }
119
120 @Override
121 public boolean hasFixedPageScale() {
122 return false;
123 }
124 } 119 }
125 120
126 static class MockZoomManager extends ZoomManager { 121 static class MockZoomManager extends ZoomManager {
127 MockZoomManager(Context context, ContentViewCore contentViewCore) { 122 MockZoomManager(Context context, ContentViewCore contentViewCore) {
128 super(context, contentViewCore); 123 super(context, contentViewCore);
129 } 124 }
130 125
131 @Override 126 @Override
132 public boolean processTouchEvent(MotionEvent event) { 127 public boolean processTouchEvent(MotionEvent event) {
133 return false; 128 return false;
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
800 public boolean didUIStealScroll(float x, float y) { 795 public boolean didUIStealScroll(float x, float y) {
801 // Not implemented. 796 // Not implemented.
802 return false; 797 return false;
803 } 798 }
804 799
805 @Override 800 @Override
806 public void invokeZoomPicker() { 801 public void invokeZoomPicker() {
807 // Not implemented. 802 // Not implemented.
808 } 803 }
809 804
810 @Override
811 public boolean hasFixedPageScale() {
812 return false;
813 }
814
815 public GestureEvent getMostRecentGestureEvent() { 805 public GestureEvent getMostRecentGestureEvent() {
816 return mMostRecentGestureEvent; 806 return mMostRecentGestureEvent;
817 } 807 }
818 808
819 public boolean mostRecentGestureEventForLastForVSync() { 809 public boolean mostRecentGestureEventForLastForVSync() {
820 return mMostRecentGestureEventWasLastForVSync; 810 return mMostRecentGestureEventWasLastForVSync;
821 } 811 }
822 } 812 }
823 813
824 /** 814 /**
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1220 event = motionEvent(MotionEvent.ACTION_UP, downTime, eventTime + 10); 1210 event = motionEvent(MotionEvent.ACTION_UP, downTime, eventTime + 10);
1221 assertFalse(mGestureHandler.onTouchEvent(event)); 1211 assertFalse(mGestureHandler.onTouchEvent(event));
1222 assertEquals("A GESTURE_SINGLE_TAP_UNCONFIRMED gesture should have been sent", 1212 assertEquals("A GESTURE_SINGLE_TAP_UNCONFIRMED gesture should have been sent",
1223 ContentViewGestureHandler.GESTURE_SINGLE_TAP_UNCONFIRMED, 1213 ContentViewGestureHandler.GESTURE_SINGLE_TAP_UNCONFIRMED,
1224 mockDelegate.mMostRecentGestureEvent.mType); 1214 mockDelegate.mMostRecentGestureEvent.mType);
1225 1215
1226 assertTrue("Should not have confirmed a single tap yet", 1216 assertTrue("Should not have confirmed a single tap yet",
1227 mMockListener.mLastSingleTap == null); 1217 mMockListener.mLastSingleTap == null);
1228 } 1218 }
1229 } 1219 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698