/platform_testing/tests/jank/sysapp_wear/src/com/android/wearable/sysapp/janktests/ |
D | SysAppTestHelper.java | 69 private UiDevice mDevice = null; field in SysAppTestHelper 84 private SysAppTestHelper(UiDevice mDevice, Instrumentation instrumentation) { in SysAppTestHelper() argument 86 this.mDevice = mDevice; in SysAppTestHelper() 89 mCard = mDevice.findObject(CARD_SELECTOR); in SysAppTestHelper() 90 mTitle = mDevice.findObject(TITLE_SELECTOR); in SysAppTestHelper() 91 mClock = mDevice.findObject(CLOCK_SELECTOR); in SysAppTestHelper() 92 mIcon = mDevice.findObject(ICON_SELECTOR); in SysAppTestHelper() 93 mText = mDevice.findObject(TEXT_SELECTOR); in SysAppTestHelper() 94 mStatus = mDevice.findObject(STATUS_BAR_SELECTOR); in SysAppTestHelper() 105 mDevice.swipe(50, in swipeRight() [all …]
|
/platform_testing/tests/functional/launchertests/src/com/android/launcher/functional/ |
D | HomeScreenTests.java | 47 private UiDevice mDevice; field in HomeScreenTests 54 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 56 mDevice.setOrientationNatural(); in setUp() 57 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp() 62 mDevice.pressHome(); in tearDown() 63 mDevice.unfreezeRotation(); in tearDown() 64 mDevice.waitForIdle(); in tearDown() 69 return mDevice.getLauncherPackageName(); in getLauncherPackage() 83 mDevice.pressHome(); in testGoHome() 84 UiObject2 hotseat = mDevice.findObject(By.res(getLauncherPackage(), HOTSEAT)); in testGoHome() [all …]
|
/platform_testing/tests/jank/uibench_wear/src/com/android/wearable/uibench/janktests/ |
D | UiBenchJankTestsHelper.java | 51 private UiDevice mDevice; field in UiBenchJankTestsHelper 55 mDevice = device; in UiBenchJankTestsHelper() 76 mDevice.waitForIdle(); in launchUiBench() 78 UiObject2 initScreen = mDevice.wait(Until.findObject(By.text(UIBENCH_OBJECT_NAME)), 2000); in launchUiBench() 81 mDevice.pressBack(); in launchUiBench() 82 initScreen = mDevice.wait(Until.findObject(By.text(UIBENCH_OBJECT_NAME)), 2000); in launchUiBench() 88 String launcherPackage = mDevice.getLauncherPackageName(); in goBackHome() 89 UiObject2 homeScreen = mDevice.findObject(By.res(launcherPackage, ROOT_NAME)); in goBackHome() 92 mDevice.pressBack(); in goBackHome() 93 homeScreen = mDevice.findObject(By.res(launcherPackage, ROOT_NAME)); in goBackHome() [all …]
|
D | UiBenchJankTests.java | 45 private UiDevice mDevice; field in UiBenchJankTests 51 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 52 mHelper = UiBenchJankTestsHelper.getInstance(mDevice, in setUp() 54 mDevice.wakeUp(); in setUp() 79 UiObject2 fullscreenOverdrawScreen = mDevice.wait(Until.findObject( in testFullscreenOverdraw() 107 UiObject2 invalidateScreen = mDevice.wait(Until.findObject( in testInvalidate() 123 UiObject2 trivialAnimationScreen = mDevice.wait(Until.findObject( in testTrivialAnimation() 139 UiObject2 trivialListViewContents = mDevice.wait(Until.findObject( in testTrivialListViewFling() 142 trivialListViewContents.setGestureMargins(mDevice.getDisplayWidth() / 2 - 40, in testTrivialListViewFling() 143 mDevice.getDisplayHeight() / 2 + 100, in testTrivialListViewFling() [all …]
|
/platform_testing/tests/androidbvt/src/com/android/androidbvt/ |
D | SysUILockScreenTests.java | 44 private UiDevice mDevice = null; field in SysUILockScreenTests 50 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 51 mDevice.freezeRotation(); in setUp() 53 mABvtHelper = AndroidBvtHelper.getInstance(mDevice, mContext, in setUp() 55 mDevice.wakeUp(); in setUp() 56 mDevice.pressHome(); in setUp() 61 mDevice.pressHome(); in tearDown() 62 mDevice.unfreezeRotation(); in tearDown() 63 mDevice.waitForIdle(); in tearDown() 119 mDevice.wait(Until.findObject( in testSlideUnlock() [all …]
|
D | SysUIGSATests.java | 40 private UiDevice mDevice; field in SysUIGSATests 47 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 48 mDevice.setOrientationNatural(); in setUp() 51 mABvtHelper = AndroidBvtHelper.getInstance(mDevice, mContext, mUiAutomation); in setUp() 52 mDevice.pressMenu(); in setUp() 53 mDevice.pressHome(); in setUp() 58 mDevice.pressHome(); in tearDown() 59 mDevice.unfreezeRotation(); in tearDown() 73 && ((searchBox = mDevice.wait(Until.findObject(By.res(QSB_PKG, "search_box")), in testGoogleQuickSearchBar() 76 mDevice.pressHome(); in testGoogleQuickSearchBar() [all …]
|
D | SysUILauncherTests.java | 47 private UiDevice mDevice = null; field in SysUILauncherTests 54 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in setUp() 56 mDevice.setOrientationNatural(); in setUp() 57 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp() 62 mDevice.pressHome(); in tearDown() 63 mDevice.unfreezeRotation(); in tearDown() 64 mDevice.waitForIdle(); in tearDown() 74 mDevice.pressMenu(); in testAddAndRemoveWidget() 76 mDevice.wait(Until.findObject(By.clazz(WIDGET_TEXT_VIEW) in testAddAndRemoveWidget() 80 mDevice.wait( in testAddAndRemoveWidget() [all …]
|
/platform_testing/libraries/launcher-helper/src/android/support/test/launcherhelper/ |
D | AospLauncherStrategy.java | 39 private UiDevice mDevice; field in AospLauncherStrategy 47 if (!mDevice.hasObject(getHotSeatSelector())) { in open() 48 mDevice.pressHome(); in open() 50 mDevice.wait(Until.hasObject(By.pkg(LAUNCHER_PKG)), 5000)); in open() 51 mDevice.waitForIdle(); in open() 54 UiObject2 cling = mDevice.findObject(By.res(LAUNCHER_PKG, "workspace_cling")); in open() 67 if (!mDevice.hasObject(APPS_CONTAINER)) { in openAllApps() 70 mDevice.findObject(By.desc("Apps")).click(); in openAllApps() 72 mDevice.wait(Until.gone(getHotSeatSelector()), 2000); in openAllApps() 73 mDevice.waitForIdle(); in openAllApps() [all …]
|
D | LeanbackLauncherStrategy.java | 38 protected UiDevice mDevice; field in LeanbackLauncherStrategy 54 mDevice = uiDevice; in setUiDevice() 63 if (!mDevice.hasObject(getWorkspaceSelector())) { in open() 64 mDevice.pressHome(); in open() 66 if (!mDevice.wait(Until.hasObject(getWorkspaceSelector()), SHORT_WAIT_TIME)) { in open() 70 mDevice.dumpWindowHierarchy(baos); in open() 82 mDevice.waitForIdle(); in open() 186 UiObject2 orbButton = mDevice.wait(Until.findObject(keyboardOrb), SHORT_WAIT_TIME); in search() 191 mDevice.pressDPadCenter(); in search() 194 mDevice.pressDPadRight(); in search() [all …]
|
D | BaseLauncher3Strategy.java | 33 protected UiDevice mDevice; field in BaseLauncher3Strategy 40 mDevice = uiDevice; in setUiDevice() 49 if (!mDevice.hasObject(getHotSeatSelector())) { in open() 50 mDevice.pressHome(); in open() 52 if (!mDevice.wait(Until.hasObject(getHotSeatSelector()), 5000)) { in open() 56 mDevice.dumpWindowHierarchy(baos); in open() 68 mDevice.waitForIdle(); in open() 86 if (!mDevice.hasObject(getAllAppsSelector())) { in openAllApps() 89 mDevice.findObject(By.desc("Apps")).click(); in openAllApps() 91 mDevice.wait(Until.gone(getHotSeatSelector()), 2000); in openAllApps() [all …]
|
/platform_testing/libraries/photos-app-helper/src/android/platform/test/helpers/ |
D | PhotosHelperImpl.java | 95 UiObject2 getStartedButton = mDevice.wait( in dismissInitialDialogs() 110 mDevice.pressBack(); in dismissInitialDialogs() 111 mDevice.waitForIdle(); in dismissInitialDialogs() 112 mDevice.pressHome(); in dismissInitialDialogs() 113 mDevice.waitForIdle(); in dismissInitialDialogs() 116 getStartedButton = mDevice.wait( in dismissInitialDialogs() 141 boolean hasAccount = !mDevice.hasObject(By.text(signInWords)); in dismissInitialDialogs() 145 UiObject2 noThanksButton = mDevice.findObject(By.text(noThanksWords)); in dismissInitialDialogs() 148 mDevice.waitForIdle(); in dismissInitialDialogs() 153 UiObject2 doneButton = mDevice.wait(Until.findObject( in dismissInitialDialogs() [all …]
|
/platform_testing/libraries/chrome-app-helper/src/android/platform/test/helpers/ |
D | ChromeHelperImpl.java | 61 mDevice.executeShellCommand("getprop dev.chrome.package"); in getPackage() 83 mDevice.executeShellCommand("getprop dev.chrome.name"); in getLauncherName() 102 UiObject2 tos = mDevice.wait(Until.findObject(By.res(getPackage(), "terms_accept")), in dismissInitialDialogs() 111 UiObject2 negative = mDevice.wait(Until.findObject( in dismissInitialDialogs() 125 UiObject2 positive = mDevice.wait(Until.findObject( in dismissInitialDialogs() 133 mDevice.wait(Until.findObject(By.res(getPackage(), UI_SEARCH_BOX_ID)), in dismissInitialDialogs() 147 mDevice.waitForIdle(); in openUrl() 149 mDevice.pressEnter(); in openUrl() 176 menuButton = mDevice.findObject(By.desc("More options")); in openMenu() 196 mDevice.findObject(By.text("Merge tabs and apps")).click(); in mergeTabs() [all …]
|
/platform_testing/libraries/google-app-camera-helper/src/android/platform/test/helpers/ |
D | GoogleCameraHelperImpl.java | 150 UiObject2 dogfoodMessage = mDevice.wait( in dismissInitialDialogs() 158 UiObject2 dogfoodMessage = mDevice.wait( in dismissInitialDialogs() 164 UiObject2 activityView = mDevice.wait(Until.findObject( in dismissInitialDialogs() 170 UiObject2 thanks = mDevice.wait(Until.findObject(By.text("GOT IT")), in dismissInitialDialogs() 177 UiObject2 location = mDevice.wait(Until.findObject( in dismissInitialDialogs() 183 UiObject2 sensor = mDevice.wait(Until.findObject( in dismissInitialDialogs() 189 if (mDevice.wait(Until.hasObject( in dismissInitialDialogs() 191 mDevice.findObject(By.res(UI_PACKAGE_NAME, "ok_button")).click(); in dismissInitialDialogs() 269 … UiObject2 snapshotButton = mDevice.findObject(By.res(UI_PACKAGE_NAME, "snapshot_button")); in snapshotVideo() 278 … UiObject2 snapshotButton = mDevice.findObject(By.res(UI_PACKAGE_NAME, "recording_time")); in snapshotVideo() [all …]
|
/platform_testing/tests/functional/settingstests/src/com/android/settings/functional/ |
D | QuickSettingsTest.java | 55 private UiDevice mDevice = null; field in QuickSettingsTest 61 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 64 mDevice.wakeUp(); in setUp() 65 mDevice.pressHome(); in setUp() 66 mDevice.setOrientationNatural(); in setUp() 72 mDevice.pressHome(); in tearDown() 73 mDevice.unfreezeRotation(); in tearDown() 79 mDevice.pressHome(); in testQuickSettingDrawDown() 82 UiObject2 quicksettingsShade = mDevice.wait( in testQuickSettingDrawDown() 92 UiObject2 quicksettingsExpand = mDevice.wait(Until.findObject(By.desc("Open settings.")), in testQuickSettingExpand() [all …]
|
D | DataUsageSettingsTests.java | 35 private UiDevice mDevice; field in DataUsageSettingsTests 40 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 42 mDevice.setOrientationNatural(); in setUp() 51 mDevice.pressBack(); in tearDown() 52 mDevice.pressHome(); in tearDown() 60 mDevice.wait(Until.findObject(By.text("Usage")), in testElementsOnDataUsageScreen() 63 mDevice.wait(Until.findObject(By.res(SETTINGS_PACKAGE, in testElementsOnDataUsageScreen() 66 mDevice.wait(Until.findObject(By.text("Data saver")), in testElementsOnDataUsageScreen() 69 mDevice.wait(Until.findObject(By.text("Wi-Fi data usage")), in testElementsOnDataUsageScreen() 72 mDevice.wait(Until.findObject(By.text("Network restrictions")), in testElementsOnDataUsageScreen() [all …]
|
/platform_testing/tests/smokefast/src/com/android/smokefast/ |
D | LockscreenTest.java | 30 private UiDevice mDevice; field in LockscreenTest 35 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 36 mDevice.freezeRotation(); in setUp() 41 mDevice.wakeUp(); in tearDown() 42 mDevice.pressMenu(); in tearDown() 43 mDevice.unfreezeRotation(); in tearDown() 50 mDevice.wait(Until.findObject( in testSlideUnlock() 54 UiObject2 workspace = mDevice.findObject(By.res(LAUNCHER_PACKAGE, "workspace")); in testSlideUnlock() 56 workspace = mDevice.findObject(By.res(LAUNCHER_PACKAGE, "workspace")); in testSlideUnlock() 63 mDevice.sleep(); in sleepAndWakeUpDevice() [all …]
|
/platform_testing/libraries/play-music-app-helper/src/android/platform/test/helpers/ |
D | PlayMusicHelperImpl.java | 78 UiObject2 skipButton = mDevice.wait(Until.findObject(By.res(UI_PACKAGE, "skip_button")), in dismissInitialDialogs() 102 mDevice.wait( in goToTab() 106 UiObject2 headerList = mDevice.findObject(By.res(UI_PACKAGE, UI_TAB_HEADER_ID)); in goToTab() 119 UiObject2 albumItem = mDevice.wait(Until.findObject(By.res(UI_PACKAGE, "li_title") in selectSong() 124 mDevice.wait(Until.findObject(By.res(UI_PACKAGE, "title").textStartsWith(album)), in selectSong() 128 UiObject2 songItem = mDevice.findObject(By.res(UI_PACKAGE, "li_title"). in selectSong() 132 mDevice.wait(Until.findObject( in selectSong() 136 mDevice.waitForIdle(); in selectSong() 139 UiObject2 scroller = mDevice.findObject( in selectSong() 158 if ((button = mDevice.findObject(selector1play)) != null) { in pauseSong() [all …]
|
/platform_testing/tests/functional/externalstorage/src/com/android/functional/externalstoragetests/ |
D | PortableStorageTests.java | 34 private UiDevice mDevice = null; field in PortableStorageTests 42 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 45 storageHelper = ExternalStorageHelper.getInstance(mDevice, mContext, mUiAutomation, in setUp() 47 mDevice.setOrientationNatural(); in setUp() 73 mDevice.wait(Until.findObject(By.res("android:id/title").text("Test_0")), in testCopyFromPortable() 75 mDevice.wait(Until.findObject(By.desc(Pattern.compile("More options", in testCopyFromPortable() 77 assertNotNull(mDevice.wait(Until.findObject(By.res("android:id/title").text("Copy to…")), in testCopyFromPortable() 79 mDevice.wait(Until.findObject(By.res("android:id/title").text("Copy to…")), in testCopyFromPortable() 81 mDevice.pressBack(); in testCopyFromPortable() 93 mDevice.wait(Until.findObject(By.res("android:id/title").text("Test_0")), in testDeleteFromPortable() [all …]
|
D | AdoptableStorageTests.java | 34 private UiDevice mDevice = null; field in AdoptableStorageTests 42 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 45 storageHelper = ExternalStorageHelper.getInstance(mDevice, mContext, mUiAutomation, in setUp() 47 mDevice.setOrientationNatural(); in setUp() 59 mDevice.wait(Until.findObject(By.text(pattern)), storageHelper.TIMEOUT).click(); in testAdoptAsAdoptableMoveDataLaterUIFlow() 61 mDevice.wait(Until.findObject(By.text(pattern)), storageHelper.TIMEOUT).clickAndWait( in testAdoptAsAdoptableMoveDataLaterUIFlow() 64 mDevice.wait(Until.findObject(By.text(pattern)), storageHelper.TIMEOUT).clickAndWait( in testAdoptAsAdoptableMoveDataLaterUIFlow() 71 mDevice.wait(Until.findObject(By.textContains("SD card")), 2 * storageHelper.TIMEOUT) in testAdoptAsAdoptableMoveDataLaterUIFlow() 73 assertTrue(mDevice.wait(Until.hasObject(By.res("android:id/title").text("Apps")), in testAdoptAsAdoptableMoveDataLaterUIFlow() 86 UiObject2 moreOptions = mDevice.wait(Until.findObject(By.desc(pattern)), in testAdoptableOverflowSettings() [all …]
|
/platform_testing/libraries/gmail-app-helper/src/android/platform/test/helpers/ |
D | GmailHelperImpl.java | 95 if (mDevice.wait(Until.hasObject(By.res(UI_PACKAGE_NAME, "welcome_tour_pager")), in dismissInitialDialogs() 100 if (mDevice.hasObject(gotItSelector)) { in dismissInitialDialogs() 101 mDevice.findObject(gotItSelector).clickAndWait(Until.newWindow(), DIALOG_TIMEOUT); in dismissInitialDialogs() 102 } else if (mDevice.hasObject(skipSelector)) { in dismissInitialDialogs() 103 mDevice.findObject(skipSelector).clickAndWait(Until.newWindow(), DIALOG_TIMEOUT); in dismissInitialDialogs() 109 UiObject2 tutorialDone = mDevice.wait(Until.findObject( in dismissInitialDialogs() 116 UiObject2 splash = mDevice.wait(Until.findObject(By.text(gotItWord)), DIALOG_TIMEOUT); in dismissInitialDialogs() 121 if (mDevice.findObject(By.textContains("Getting your messages")) != null) { in dismissInitialDialogs() 122 if (!mDevice.wait(Until.gone(By.text("Getting your messages")), WIFI_TIMEOUT)) { in dismissInitialDialogs() 127 if (!mDevice.wait(Until.hasObject( in dismissInitialDialogs() [all …]
|
/platform_testing/tests/functional/notificationtests/src/com/android/notification/functional/ |
D | NotificationInlineReplyTests.java | 35 private UiDevice mDevice = null; field in NotificationInlineReplyTests 42 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 46 mHelper = new NotificationHelper(mDevice, getInstrumentation(), mNotificationManager); in setUp() 48 mDevice.setOrientationNatural(); in setUp() 52 mDevice.pressHome(); in setUp() 59 mDevice.pressHome(); in tearDown() 68 UiObject2 obj = mDevice.wait(Until.findObject(By.text("INLINE REPLY TEST")), in testInLineNotificationWithLockScreen() 70 mDevice.swipe(obj.getVisibleBounds().centerX(), obj.getVisibleBounds().centerY(), in testInLineNotificationWithLockScreen() 72 mDevice.getDisplayHeight(), 5); in testInLineNotificationWithLockScreen() 73 mDevice.wait(Until.findObject(By.text("REPLY")), LONG_TIMEOUT).click(); in testInLineNotificationWithLockScreen() [all …]
|
/platform_testing/tests/jank/UbSystemUiJankTests/src/android/platform/systemui/tests/jank/ |
D | SystemUiJankTests.java | 76 private UiDevice mDevice; field in SystemUiJankTests 80 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 82 mDevice.setOrientationNatural(); in setUp() 89 mDevice.pressHome(); in goHome() 90 mDevice.waitForIdle(); in goHome() 95 mDevice.unfreezeRotation(); in tearDown() 119 while (mDevice.hasObject(By.textContains("has stopped"))) { in populateRecentApps() 120 mDevice.findObject(By.text("Close")).clickAndWait(Until.newWindow(), 2000); in populateRecentApps() 131 mDevice.executeShellCommand("am force-stop " + pkg); in forceStopPackages() 144 mDevice.pressHome(); in resetRecentsToBottom() [all …]
|
/platform_testing/tests/jank/androidtvjanktests/src/com/android/androidtv/janktests/ |
D | SystemUiJankTests.java | 44 private UiDevice mDevice; field in SystemUiJankTests 48 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 57 mDevice.pressHome(); in goHome() 59 UiObject2 homeScreen = mDevice.wait( in goHome() 82 mDevice.wait(Until.findObject(By.scrollable(true).res(LEANBACK_LAUNCHER, "main_list_view")), in goToSettingsRow() 87 while (count <= 5 && !(mDevice.hasObject(By.res(LEANBACK_LAUNCHER, "label") in goToSettingsRow() 89 mDevice.pressDPadDown(); in goToSettingsRow() 92 if (!mDevice.hasObject(By.res(LEANBACK_LAUNCHER, "label").text("Settings"))) { in goToSettingsRow() 110 mDevice.pressDPadCenter(); in testNavigateToSettings() 112 mDevice.pressBack(); in testNavigateToSettings() [all …]
|
/platform_testing/libraries/play-books-app-helper/src/android/platform/test/helpers/ |
D | PlayBooksHelperImpl.java | 107 UiObject2 allBooksButton = mDevice.wait(Until.findObject( in goToAllBooksTab() 122 mDevice.wait(Until.hasObject( in openBook() 136 exitBookButton = mDevice.wait( in exitReadingMode() 145 boolean hasNavButton = mDevice.wait(Until.hasObject( in exitReadingMode() 161 int displayHeight = mDevice.getDisplayHeight(); in goToNextPage() 162 int displayWidth = mDevice.getDisplayWidth(); in goToNextPage() 165 mDevice.click(nextPageX, nextPageY); in goToNextPage() 177 int displayHeight = mDevice.getDisplayHeight(); in goToPreviousPage() 178 int displayWidth = mDevice.getDisplayWidth(); in goToPreviousPage() 181 mDevice.click(previousPageX, previousPageY); in goToPreviousPage() [all …]
|
/platform_testing/libraries/play-movies-app-helper/src/android/platform/test/helpers/ |
D | PlayMoviesHelperImpl.java | 94 while (mDevice.hasObject(nextButton) && count < 10) { in dismissInitialDialogs() 95 mDevice.findObject(nextButton).click(); in dismissInitialDialogs() 96 mDevice.wait(Until.gone(nextButton), 1000); in dismissInitialDialogs() 101 while (mDevice.hasObject(gotIt) && count < 3) { in dismissInitialDialogs() 102 UiObject2 gotItButton = mDevice.findObject(gotIt); in dismissInitialDialogs() 105 mDevice.wait(Until.gone(gotIt), 1000); in dismissInitialDialogs() 115 UiObject2 startedButton = mDevice.wait(Until.findObject(By.text(words)), 5000); in dismissInitialDialogs() 133 UiObject2 libraryButton = mDevice.findObject(By.text(myLibraryPattern).clickable(true)); in openMoviesTab() 143 mDevice.waitForIdle(); in openMoviesTab() 154 title = mDevice.findObject(By.textContains(name)); in playMovie() [all …]
|