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

Unified Diff: content/public/android/javatests/src/org/chromium/content/browser/LongPressDetectorTest.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/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 f3348176fa6c01df636fad16f577374de30b317c..9fd2ca116eeda639d92ecdc968dee6be1c4921a0 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
@@ -11,12 +11,12 @@ import android.test.suitebuilder.annotation.SmallTest;
import android.view.MotionEvent;
import android.view.ViewConfiguration;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
import org.chromium.base.test.util.Feature;
import org.chromium.base.test.util.ScalableTimeout;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
/**
* Test suite for LongPressDetector.
*/
@@ -159,6 +159,7 @@ public class LongPressDetectorTest extends InstrumentationTestCase {
LongPressDetector longPressDetector = new LongPressDetector(
getInstrumentation().getTargetContext(),
new LongPressDetector.LongPressDelegate() {
+ @Override
public void onLongPress(MotionEvent event) {
longPressCalled.countDown();
}
@@ -166,7 +167,7 @@ public class LongPressDetectorTest extends InstrumentationTestCase {
final long downTime = SystemClock.uptimeMillis();
final long eventTime = SystemClock.uptimeMillis();
joth 2013/03/14 20:30:56 micro-nit: to retain the exact behavior as before,
Yaron 2013/03/14 20:34:04 Err, I assumed this was inadvertent but maybe I'm
joth 2013/03/14 20:35:38 o i c. we do this all over the place in this file.
- MotionEvent event = motionEvent(MotionEvent.ACTION_DOWN, downTime, downTime);
+ MotionEvent event = motionEvent(MotionEvent.ACTION_DOWN, downTime, eventTime);
longPressDetector.startLongPressTimerIfNeeded(event);
}
});

Powered by Google App Engine
This is Rietveld 408576698