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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/LongPressDetectorTest.java

Issue 129783004: [Android] Always offer touchmove's for events with multiple pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/android/javatests/src/org/chromium/content/browser/LongPressDetectorTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/LongPressDetectorTest.java b/content/public/android/javatests/src/org/chromium/content/browser/LongPressDetectorTest.java
index a89a285c4b58b19e5254371695218d5c93dfaaa6..a97a0e63aab36deb1b9c802e791157273e5af536 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/LongPressDetectorTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/LongPressDetectorTest.java
@@ -9,7 +9,6 @@ import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.LargeTest;
import android.test.suitebuilder.annotation.SmallTest;
import android.view.MotionEvent;
-import android.view.ViewConfiguration;
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.ScalableTimeout;
@@ -112,36 +111,6 @@ public class LongPressDetectorTest extends InstrumentationTestCase {
}
/**
- * Verify that the touch move threshold (slop) is working for events offered to native.
- */
- @SmallTest
- @Feature({"AndroidWebView"})
- public void testConfirmOfferMoveEventToNative() {
- final int slop = ViewConfiguration.get(getInstrumentation().getTargetContext())
- .getScaledTouchSlop();
-
- long eventTime = SystemClock.uptimeMillis();
- final MotionEvent downEvent = MotionEvent.obtain(
- eventTime, eventTime, MotionEvent.ACTION_DOWN, FAKE_COORD_X, FAKE_COORD_Y, 0);
-
- // Test a small move, where confirmOfferMoveEventToNative should return false.
- mLongPressDetector.onOfferTouchEventToJavaScript(downEvent);
- eventTime = SystemClock.uptimeMillis();
- final MotionEvent smallMove = MotionEvent.obtain(
- eventTime, eventTime, MotionEvent.ACTION_MOVE,
- FAKE_COORD_X + slop / 2, FAKE_COORD_Y + slop / 2, 0);
- assertFalse(mLongPressDetector.confirmOfferMoveEventToJavaScript(smallMove));
-
- // Test a big move, where confirmOfferMoveEventToNative should return true.
- mLongPressDetector.onOfferTouchEventToJavaScript(downEvent);
- eventTime = SystemClock.uptimeMillis();
- final MotionEvent largeMove = MotionEvent.obtain(
- eventTime, eventTime, MotionEvent.ACTION_MOVE,
- FAKE_COORD_X + slop * 2, FAKE_COORD_Y + slop * 2, 0);
- assertTrue(mLongPressDetector.confirmOfferMoveEventToJavaScript(largeMove));
- }
-
- /**
* This is an example of a large test running delayed messages.
* It exercises GestureDetector itself, and expects the onLongPress to be called.
* Note that GestureDetector creates a Handler and posts message to it for detecting
« no previous file with comments | « content/public/android/javatests/src/org/chromium/content/browser/ContentViewGestureHandlerTest.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698