| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.graphics.PointF; | 7 import android.graphics.PointF; |
| 8 import android.support.test.filters.SmallTest; |
| 8 import android.test.InstrumentationTestCase; | 9 import android.test.InstrumentationTestCase; |
| 9 import android.test.suitebuilder.annotation.SmallTest; | |
| 10 import android.view.MotionEvent; | 10 import android.view.MotionEvent; |
| 11 | 11 |
| 12 import org.chromium.base.test.util.Feature; | 12 import org.chromium.base.test.util.Feature; |
| 13 import org.chromium.chromoting.jni.TouchEventData; | 13 import org.chromium.chromoting.jni.TouchEventData; |
| 14 | 14 |
| 15 /** Tests for {@link TouchInputStrategy}. */ | 15 /** Tests for {@link TouchInputStrategy}. */ |
| 16 public class TouchInputStrategyTest extends InstrumentationTestCase { | 16 public class TouchInputStrategyTest extends InstrumentationTestCase { |
| 17 // Tests are run using a screen which is smaller than the size of the remote
desktop and is | 17 // Tests are run using a screen which is smaller than the size of the remote
desktop and is |
| 18 // translated to the middle of the remote desktop area. This allows us to v
erify that the | 18 // translated to the middle of the remote desktop area. This allows us to v
erify that the |
| 19 // remote events which are 'injected' are correctly mapped and represent the
remote coordinates. | 19 // remote events which are 'injected' are correctly mapped and represent the
remote coordinates. |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 for (int i = 0; i < 10000; i++) { | 389 for (int i = 0; i < 10000; i++) { |
| 390 injectMoveEvent(0, fingerOnePosX, i % 10); | 390 injectMoveEvent(0, fingerOnePosX, i % 10); |
| 391 injectMoveEvent(1, fingerTwoPosX, i % 10); | 391 injectMoveEvent(1, fingerTwoPosX, i % 10); |
| 392 } | 392 } |
| 393 mInputInjector.assertEmpty(); | 393 mInputInjector.assertEmpty(); |
| 394 | 394 |
| 395 mInputStrategy.onScroll(0.0f, 0.0f); | 395 mInputStrategy.onScroll(0.0f, 0.0f); |
| 396 mInputInjector.assertEmpty(); | 396 mInputInjector.assertEmpty(); |
| 397 } | 397 } |
| 398 } | 398 } |
| OLD | NEW |