mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-04-20 17:50:49 +01:00
Fix inverted swipe up/down gestures
Tested on Chromebook and Mate 8
This commit is contained in:
parent
f76c00dd99
commit
b4026ae390
Binary file not shown.
@ -274,19 +274,19 @@ public class BaseUiAutomation extends UiAutomatorTestCase {
|
||||
|
||||
public void uiDeviceSwipeUp(int steps) {
|
||||
UiDevice.getInstance().swipe(
|
||||
getDisplayCentreWidth(),
|
||||
(getDisplayCentreHeight() / 2),
|
||||
getDisplayCentreWidth(),
|
||||
(getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)),
|
||||
getDisplayCentreWidth(),
|
||||
(getDisplayCentreHeight() / 2),
|
||||
steps);
|
||||
}
|
||||
|
||||
public void uiDeviceSwipeDown(int steps) {
|
||||
UiDevice.getInstance().swipe(
|
||||
getDisplayCentreWidth(),
|
||||
(getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)),
|
||||
getDisplayCentreWidth(),
|
||||
(getDisplayCentreHeight() / 2),
|
||||
getDisplayCentreWidth(),
|
||||
(getDisplayCentreHeight() + (getDisplayCentreHeight() / 2)),
|
||||
steps);
|
||||
}
|
||||
|
||||
|
Binary file not shown.
@ -147,8 +147,8 @@ public class UiAutomation extends UxPerfUiAutomation {
|
||||
|
||||
// Perform a range of swipe tests at different speeds and on different views
|
||||
LinkedHashMap<String, GestureTestParams> testParams = new LinkedHashMap<String, GestureTestParams>();
|
||||
testParams.put("swipe_down", new GestureTestParams(GestureType.UIDEVICE_SWIPE, Direction.DOWN, 100));
|
||||
testParams.put("swipe_up", new GestureTestParams(GestureType.UIDEVICE_SWIPE, Direction.UP, 100));
|
||||
testParams.put("swipe_down", new GestureTestParams(GestureType.UIDEVICE_SWIPE, Direction.DOWN, 100));
|
||||
testParams.put("swipe_right", new GestureTestParams(GestureType.UIOBJECT_SWIPE, Direction.RIGHT, 50));
|
||||
testParams.put("swipe_left", new GestureTestParams(GestureType.UIOBJECT_SWIPE, Direction.LEFT, 50));
|
||||
testParams.put("pinch_out", new GestureTestParams(GestureType.PINCH, PinchType.OUT, 100, 50));
|
||||
|
Loading…
x
Reference in New Issue
Block a user