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

Side by Side Diff: remoting/android/javatests/src/org/chromium/chromoting/SwipePinchDetectorTest.java

Issue 2583933003: Replace deprecated Android java test annotations (Closed)
Patch Set: Rebase again :( Created 4 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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.chromoting; 5 package org.chromium.chromoting;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.os.SystemClock; 8 import android.os.SystemClock;
9 import android.support.test.filters.SmallTest;
9 import android.test.InstrumentationTestCase; 10 import android.test.InstrumentationTestCase;
10 import android.test.suitebuilder.annotation.SmallTest;
11 import android.view.InputDevice; 11 import android.view.InputDevice;
12 import android.view.MotionEvent; 12 import android.view.MotionEvent;
13 import android.view.ViewConfiguration; 13 import android.view.ViewConfiguration;
14 14
15 import org.chromium.base.test.util.Feature; 15 import org.chromium.base.test.util.Feature;
16 16
17 /** Tests for {@link SwipePinchDetector}. */ 17 /** Tests for {@link SwipePinchDetector}. */
18 public class SwipePinchDetectorTest extends InstrumentationTestCase { 18 public class SwipePinchDetectorTest extends InstrumentationTestCase {
19 private SwipePinchDetector mDetector; 19 private SwipePinchDetector mDetector;
20 private float mTouchSlop; 20 private float mTouchSlop;
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 // Repeat the same test, but use ACTION_POINTER_DOWN to start a new gest ure, which should 209 // Repeat the same test, but use ACTION_POINTER_DOWN to start a new gest ure, which should
210 // terminate the current one. 210 // terminate the current one.
211 injectEvent(MotionEvent.ACTION_POINTER_DOWN); 211 injectEvent(MotionEvent.ACTION_POINTER_DOWN);
212 mCurrentPositions[0].x += mTouchSlop * 3; 212 mCurrentPositions[0].x += mTouchSlop * 3;
213 injectEvent(MotionEvent.ACTION_MOVE); 213 injectEvent(MotionEvent.ACTION_MOVE);
214 assertTrue(mDetector.isPinching()); 214 assertTrue(mDetector.isPinching());
215 injectEvent(MotionEvent.ACTION_POINTER_DOWN); 215 injectEvent(MotionEvent.ACTION_POINTER_DOWN);
216 assertFalse(mDetector.isPinching()); 216 assertFalse(mDetector.isPinching());
217 } 217 }
218 } 218 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698