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

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

Issue 12545043: Fix several findbugs issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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
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 b0e70891aef9b10f1ec501f70c2b7b22ca5a83c0..0969efb87c178c93b39e2802ab37b784cbc9964f 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
@@ -12,15 +12,12 @@ import android.test.suitebuilder.annotation.SmallTest;
import android.util.Log;
import android.view.MotionEvent;
-import java.util.ArrayDeque;
-import java.util.ArrayList;
-import java.util.Deque;
-import java.util.concurrent.CountDownLatch;
-
import org.chromium.base.test.util.Feature;
import org.chromium.content.browser.ContentViewGestureHandler.MotionEventDelegate;
import org.chromium.content.browser.third_party.GestureDetector;
-import org.chromium.content.browser.third_party.GestureDetector.SimpleOnGestureListener;
+
+import java.util.ArrayList;
+import java.util.concurrent.CountDownLatch;
/**
* Test suite for ContentViewGestureHandler.
@@ -613,12 +610,12 @@ public class ContentViewGestureHandlerTest extends InstrumentationTestCase {
* Mock MotionEventDelegate that remembers the most recent gesture event.
*/
static class GestureRecordingMotionEventDelegate implements MotionEventDelegate {
- public class GestureEvent {
- private int mType;
- private long mTimeMs;
- private int mX;
- private int mY;
- private Bundle mExtraParams;
+ static class GestureEvent {
+ private final int mType;
+ private final long mTimeMs;
+ private final int mX;
+ private final int mY;
+ private final Bundle mExtraParams;
public GestureEvent(int type, long timeMs, int x, int y, Bundle extraParams) {
mType = type;
@@ -649,7 +646,7 @@ public class ContentViewGestureHandlerTest extends InstrumentationTestCase {
}
};
private GestureEvent mMostRecentGestureEvent;
- private ArrayList<Integer> mGestureTypeList = new ArrayList<Integer>();
+ private final ArrayList<Integer> mGestureTypeList = new ArrayList<Integer>();
@Override
public boolean sendTouchEvent(long timeMs, int action, TouchPoint[] pts) {

Powered by Google App Engine
This is Rietveld 408576698