1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-21 01:59:13 +00:00

Update slide indexes

This commit is contained in:
muendelezaji 2016-05-22 20:02:47 +01:00 committed by muendelezaji
parent 294f9d95a1
commit 019f953940
2 changed files with 8 additions and 8 deletions

View File

@ -153,7 +153,7 @@ public class UiAutomation extends UxPerfUiAutomation {
clickView(BY_DESC, "Open presentation"); clickView(BY_DESC, "Open presentation");
clickView(BY_TEXT, "Device storage", true); clickView(BY_TEXT, "Device storage", true);
timer.end(); timer.end();
results.put("open_picker", timer); results.put("open_file_picker", timer);
// Allow SD card access if requested // Allow SD card access if requested
UiObject permissionView = new UiObject(new UiSelector().textContains("Allow Slides")); UiObject permissionView = new UiObject(new UiSelector().textContains("Allow Slides"));
if (permissionView.waitForExists(DIALOG_WAIT_TIME_MS)) { if (permissionView.waitForExists(DIALOG_WAIT_TIME_MS)) {
@ -173,7 +173,7 @@ public class UiAutomation extends UxPerfUiAutomation {
int centerY = getUiDevice().getDisplayHeight() / 2; int centerY = getUiDevice().getDisplayHeight() / 2;
int centerX = getUiDevice().getDisplayWidth() / 2; int centerX = getUiDevice().getDisplayWidth() / 2;
int slidesLeft = slideCount - 1; int slideIndex = 0;
String testTag; String testTag;
Timer slideTimer; Timer slideTimer;
@ -181,8 +181,8 @@ public class UiAutomation extends UxPerfUiAutomation {
startDumpsys(ACTIVITY_SLIDES); startDumpsys(ACTIVITY_SLIDES);
timer = new Timer(); timer = new Timer();
timer.start(); timer.start();
while (slidesLeft-- > 0) { while (++slideIndex < slideCount) {
testTag = "slides_next_" + (slideCount - slidesLeft); testTag = "slides_next_" + slideIndex;
startDumpsys(ACTIVITY_SLIDES); startDumpsys(ACTIVITY_SLIDES);
slideTimer = new Timer(); slideTimer = new Timer();
slideTimer.start(); slideTimer.start();
@ -201,8 +201,8 @@ public class UiAutomation extends UxPerfUiAutomation {
startDumpsys(ACTIVITY_SLIDES); startDumpsys(ACTIVITY_SLIDES);
timer = new Timer(); timer = new Timer();
timer.start(); timer.start();
while (++slidesLeft < slideCount - 1) { while (--slideIndex > 0) {
testTag = "slides_previous_" + (slideCount - 1 - slidesLeft); testTag = "slides_previous_" + slideIndex;
startDumpsys(ACTIVITY_SLIDES); startDumpsys(ACTIVITY_SLIDES);
slideTimer = new Timer(); slideTimer = new Timer();
slideTimer.start(); slideTimer.start();
@ -227,8 +227,8 @@ public class UiAutomation extends UxPerfUiAutomation {
startDumpsys(ACTIVITY_SLIDES); startDumpsys(ACTIVITY_SLIDES);
timer = new Timer(); timer = new Timer();
timer.start(); timer.start();
while (slidesLeft-- > 0) { while (++slideIndex < slideCount) {
testTag = "slideshow_next_" + (slideCount - slidesLeft); testTag = "slideshow_next_" + slideIndex;
startDumpsys(ACTIVITY_SLIDES); startDumpsys(ACTIVITY_SLIDES);
slideTimer = new Timer(); slideTimer = new Timer();
slideTimer.start(); slideTimer.start();