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

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

Issue 2373123002: Remove JoystickScrollProvider (Closed)
Patch Set: Removed unit test Created 4 years, 3 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/java/src/org/chromium/content/browser/input/JoystickScrollProvider.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/ContentViewScrollingTest.java
diff --git a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java
index 8e589bb84bb6e1baa6885d509c0945361ac05ef9..464fdb6310050191d4840da3a7f6ddccc7b60067 100644
--- a/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java
+++ b/content/public/android/javatests/src/org/chromium/content/browser/ContentViewScrollingTest.java
@@ -7,7 +7,6 @@ package org.chromium.content.browser;
import android.content.res.Configuration;
import android.os.SystemClock;
import android.test.suitebuilder.annotation.SmallTest;
-import android.view.InputDevice;
import android.view.KeyEvent;
import android.view.MotionEvent;
@@ -133,23 +132,6 @@ public class ContentViewScrollingTest extends ContentShellTestBase {
});
}
- private void scrollWithJoystick(final float deltaAxisX, final float deltaAxisY)
- throws Throwable {
- runTestOnUiThread(new Runnable() {
- @Override
- public void run() {
- // Synthesize joystick motion event and send to ContentViewCore.
- MotionEvent leftJoystickMotionEvent =
- MotionEvent.obtain(0, SystemClock.uptimeMillis(), MotionEvent.ACTION_MOVE,
- deltaAxisX, deltaAxisY, 0);
- leftJoystickMotionEvent.setSource(
- leftJoystickMotionEvent.getSource() | InputDevice.SOURCE_CLASS_JOYSTICK);
- getContentViewCore().getContainerView().onGenericMotionEvent(
- leftJoystickMotionEvent);
- }
- });
- }
-
@Override
protected void setUp() throws Exception {
super.setUp();
@@ -251,34 +233,6 @@ public class ContentViewScrollingTest extends ContentShellTestBase {
assertWaitForScroll(false, false);
}
- @SmallTest
- @Feature({"Main"})
- public void testJoystickScroll() throws Throwable {
- scrollTo(0, 0);
- assertWaitForScroll(true, true);
-
- // Scroll with X axis in deadzone and the Y axis active.
- // Only the Y axis should have an effect, arriving at lower-left.
- scrollWithJoystick(0.1f, 1f);
- assertWaitForScroll(true, false);
-
- // Scroll with Y axis in deadzone and the X axis active.
- scrollWithJoystick(1f, -0.1f);
- assertWaitForScroll(false, false);
-
- // Vertical scroll to upper-right.
- scrollWithJoystick(0, -0.75f);
- assertWaitForScroll(false, true);
-
- // Horizontal scroll to top-left.
- scrollWithJoystick(-0.75f, 0);
- assertWaitForScroll(true, true);
-
- // Diagonal scroll to bottom-right.
- scrollWithJoystick(1f, 1f);
- assertWaitForScroll(false, false);
- }
-
/**
* To ensure the device properly responds to bounds-exceeding scrolls, e.g., overscroll
* effects are properly initialized.
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/input/JoystickScrollProvider.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698