/platform_testing/tests/jank/sysapp_wear/src/com/android/wearable/sysapp/janktests/ |
D | SysAppTestHelper.java | 53 private UiDevice mDevice = null; field in SysAppTestHelper 61 private SysAppTestHelper(UiDevice mDevice, Instrumentation instrumentation) { in SysAppTestHelper() argument 63 this.mDevice = mDevice; in SysAppTestHelper() 77 mDevice.swipe(50, in swipeRight() 78 mDevice.getDisplayHeight() / 2, mDevice.getDisplayWidth() - 25, in swipeRight() 79 mDevice.getDisplayHeight() / 2, 30); // slow speed in swipeRight() 84 mDevice.swipe(mDevice.getDisplayWidth() - 50, mDevice.getDisplayHeight() / 2, 50, in swipeLeft() 85 mDevice.getDisplayHeight() / 2, 30); // slow speed in swipeLeft() 90 mDevice.swipe(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight() / 2 + 50, in swipeUp() 91 mDevice.getDisplayWidth() / 2, 0, 30); // slow speed in swipeUp() [all …]
|
/platform_testing/tests/functional/overviewtests/src/com/android/overview/functional/ |
D | MultiWindowTests.java | 51 private UiDevice mDevice; field in MultiWindowTests 60 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 63 mDevice.setOrientationNatural(); in setUp() 64 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp() 65 mOverviewHelper = new OverviewHelper(mDevice, getInstrumentation()); in setUp() 70 mDevice.pressHome(); in tearDown() 71 mDevice.unfreezeRotation(); in tearDown() 72 mDevice.waitForIdle(); in tearDown() 77 return mDevice.getLauncherPackageName(); in getLauncherPackage() 84 mDevice.click(mDevice.getDisplayHeight() * 3/4, mDevice.getDisplayWidth() / 2); in testDockingUndockingOnMultiwindow() [all …]
|
D | OverviewHelper.java | 49 private UiDevice mDevice; field in OverviewHelper 55 this.mDevice = device; in OverviewHelper() 61 return mDevice.getLauncherPackageName(); in getLauncherPackage() 86 mDevice.pressRecentApps(); in navigateToRecents() 87 mDevice.waitForIdle(); in navigateToRecents() 88 return mDevice.wait(Until.findObject(By.res(RECENTS)), TIMEOUT); in navigateToRecents() 115 mDevice.swipe(r.width() / 2, top, r.width() / 2, bottom, 5); in scrollToTopOfRecents() 116 mDevice.waitForIdle(); in scrollToTopOfRecents() 127 mDevice.pressRecentApps(); in dockAppToTopMultiwindowSlot() 128 mDevice.waitForIdle(); in dockAppToTopMultiwindowSlot() [all …]
|
D | RecentsTests.java | 48 private UiDevice mDevice; field in RecentsTests 56 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 58 mDevice.setOrientationNatural(); in setUp() 59 mLauncherStrategy = LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy(); in setUp() 60 mOverviewHelper = new OverviewHelper(mDevice, getInstrumentation()); in setUp() 65 mDevice.pressHome(); in tearDown() 66 mDevice.unfreezeRotation(); in tearDown() 67 mDevice.waitForIdle(); in tearDown() 81 UiObject2 dismissCalculator = mDevice.wait(Until.findObject in testAddAndDismissItemInRecents() 85 mDevice.waitForIdle(); in testAddAndDismissItemInRecents() [all …]
|
/platform_testing/tests/perf/PerfTransitionTest/src/com/android/apptransition/tests/ |
D | LatencyTests.java | 47 private UiDevice mDevice; field in LatencyTests 52 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 56 mDevice.pressHome(); in setUp() 68 mDevice.waitForIdle(); in testExpandNotificationsLatency() 70 mDevice.waitForIdle(); in testExpandNotificationsLatency() 78 mDevice.swipe(mDevice.getDisplayWidth() / 2, in swipeDown() 79 0, mDevice.getDisplayWidth() / 2, in swipeDown() 80 mDevice.getDisplayHeight() / 2, in swipeDown() 85 mDevice.swipe(mDevice.getDisplayWidth() / 2, in swipeUp() 86 mDevice.getDisplayHeight() / 2, in swipeUp() [all …]
|
/platform_testing/tests/functional/calculator/src/com/android/calculator/functional/ |
D | CalculatorTests.java | 36 private UiDevice mDevice = null; field in CalculatorTests 42 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 44 mDevice.setOrientationNatural(); in setUp() 45 mDevice.pressHome(); in setUp() 46 mCalculatorHelper = CalculatorHelper.getInstance(mDevice, mContext); in setUp() 51 mDevice.pressHome(); in tearDown() 52 mDevice.unfreezeRotation(); in tearDown() 59 mDevice.waitForIdle(); in launchCalculator() 68 mDevice.waitForIdle(); in testAdd() 69 mDevice.pressBack(); in testAdd() [all …]
|
/platform_testing/tests/jank/uibench_wear/src/com/android/wearable/uibench/janktests/ |
D | UiBenchJankTestsHelper.java | 57 private UiDevice mDevice; field in UiBenchJankTestsHelper 61 mDevice = device; in UiBenchJankTestsHelper() 82 mDevice.waitForIdle(); in launchUiBench() 84 UiObject2 initScreen = mDevice.wait(Until.findObject(By.text(UIBENCH_OBJECT_NAME)), 2000); in launchUiBench() 87 mDevice.pressBack(); in launchUiBench() 88 initScreen = mDevice.wait(Until.findObject(By.text(UIBENCH_OBJECT_NAME)), 2000); in launchUiBench() 94 String launcherPackage = mDevice.getLauncherPackageName(); in goBackHome() 95 UiObject2 homeScreen = mDevice.findObject(By.res(launcherPackage, ROOT_NAME)); in goBackHome() 98 mDevice.pressBack(); in goBackHome() 99 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/jank/UbSystemUiJankTests/src/android/platform/systemui/tests/jank/ |
D | SystemUiJankTests.java | 109 private UiDevice mDevice; field in SystemUiJankTests 114 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 116 mDevice.setOrientationNatural(); in setUp() 127 mDevice.pressHome(); in goHome() 128 mDevice.waitForIdle(); in goHome() 133 mDevice.unfreezeRotation(); in tearDown() 156 mDevice.pressHome(); in resetRecentsToBottom() 157 mDevice.waitForIdle(); in resetRecentsToBottom() 159 mDevice.pressRecentApps(); in resetRecentsToBottom() 164 mDevice.wait(Until.findObject(RECENTS), 10000); in resetRecentsToBottom() [all …]
|
D | SettingsJankTests.java | 54 private UiDevice mDevice; field in SettingsJankTests 57 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 60 mDevice.setOrientationNatural(); in setUp() 65 mDevice.pressHome(); in setUp() 66 mDevice.waitForIdle(); in setUp() 73 mDevice.wait(Until.hasObject(By.pkg(SETTINGS_PACKAGE).depth(0)), TIMEOUT); in setUp() 79 mDevice.unfreezeRotation(); in tearDown() 84 UiObject2 list = mDevice.wait(Until.findObject(SETTINGS_DASHBOARD), TIMEOUT); in flingSettingsToStart() 87 mDevice.wait(Until.findObject(By.text("SEE ALL")), TIMEOUT).click(); in flingSettingsToStart() 88 list = mDevice.wait(Until.findObject(SETTINGS_DASHBOARD), TIMEOUT); in flingSettingsToStart() [all …]
|
/platform_testing/libraries/system-helpers/sysui-helper/src/android/system/helpers/ |
D | LockscreenHelper.java | 52 private UiDevice mDevice = null; field in LockscreenHelper 60 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in LockscreenHelper() 81 int w = mDevice.getDisplayWidth(); in launchCameraOnLockScreen() 82 int h = mDevice.getDisplayHeight(); in launchCameraOnLockScreen() 84 mDevice.drag((w - 25), (h - 25), (int) (w * 0.5), (int) (w * 0.5), 40); in launchCameraOnLockScreen() 85 mDevice.waitForIdle(); in launchCameraOnLockScreen() 86 return mDevice.wait(Until.hasObject( in launchCameraOnLockScreen() 99 mDevice.wait(Until.findObject(By.text(mode)), LONG_TIMEOUT * 2).click(); in setScreenLock() 102 mDevice.wait(Until.findObject(By.text("No thanks")), LONG_TIMEOUT).click(); in setScreenLock() 104 UiObject2 pinField = mDevice.wait(Until.findObject(By.clazz(EDIT_TEXT_CLASS_NAME)), in setScreenLock() [all …]
|
D | OverviewHelper.java | 50 private UiDevice mDevice = null; field in OverviewHelper 57 mDevice = UiDevice.getInstance(InstrumentationRegistry.getInstrumentation()); in OverviewHelper() 76 mDevice.pressRecentApps(); in navigateToRecents() 77 mDevice.waitForIdle(); in navigateToRecents() 78 return mDevice.wait(Until.findObject(By.res(RECENTS)), TIMEOUT); in navigateToRecents() 127 while (mDevice.hasObject(By.textContains("has stopped"))) { in populateManyRecentApps() 128 UiObject2 crashDialog = mDevice.findObject(By.text("Close")); in populateManyRecentApps() 151 mDevice.swipe(r.width() / 2, top, r.width() / 2, bottom, 5); in scrollToTopOfRecents() 152 mDevice.waitForIdle(); in scrollToTopOfRecents() 163 mDevice.pressRecentApps(); in dockAppToTopMultiwindowSlot() [all …]
|
D | QuickSettingsHelper.java | 35 private UiDevice mDevice = null; field in QuickSettingsHelper 42 this.mDevice = device; in QuickSettingsHelper() 84 UiObject2 quickSettingEdit = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu() 92 UiObject2 quickSettingTileObject = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu() 94 Point destination = mDevice.wait(Until.findObject in addQuickSettingTileFromEditMenu() 106 mDevice.wait(Until.findObject(By.descContains("Navigate up")), LONG_TIMEOUT); in addQuickSettingTileFromEditMenu() 128 mDevice.pressHome(); in launchQuickSetting() 135 mDevice.swipe(mDevice.getDisplayWidth() / 2, mDevice.getDisplayHeight(), in swipeUp() 136 mDevice.getDisplayWidth() / 2, 0, 30); in swipeUp() 141 mDevice.swipe(mDevice.getDisplayWidth() / 2, 0, mDevice.getDisplayWidth() / 2, in swipeDown() [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 | 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() 90 mDevice.wait(Until.findObject(getAllAppsButtonSelector()), 2000); in openAllApps() 94 mDevice.wait(Until.gone(getHotSeatSelector()), 2000); in openAllApps() [all …]
|
D | WearLauncherStrategy.java | 41 protected UiDevice mDevice; field in WearLauncherStrategy 57 mDevice = uiDevice; in setUiDevice() 65 if (!mDevice.hasObject(getHotSeatSelector())) { in open() 66 mDevice.pressHome(); in open() 67 if (!mDevice.wait(Until.hasObject(getHotSeatSelector()), 5000)) { in open() 71 mDevice.waitForIdle(); in open() 82 if (!mDevice.hasObject(getAllAppsSelector())) { in openAllApps() 83 mDevice.pressHome(); in openAllApps() 84 mDevice.waitForIdle(); in openAllApps() 85 if (!mDevice.wait(Until.hasObject(getAllAppsSelector()), 5000)) { in openAllApps() [all …]
|
D | CommonLauncherHelper.java | 41 private UiDevice mDevice; field in CommonLauncherHelper 44 mDevice = uiDevice; in CommonLauncherHelper() 93 UiObject2 appIcon = mDevice.findObject(app); in ensureIconVisible() 151 if (!mDevice.hasObject(app)) { in launchApp() 154 if (!mDevice.hasObject(app)) { in launchApp() 157 while (!mDevice.hasObject(app) && container.scroll(dir, 0.8f)) { in launchApp() 171 if (!mDevice.findObject(app).clickAndWait(Until.newWindow(), APP_LAUNCH_TIMEOUT)) { in launchApp() 175 mDevice.waitForIdle(); in launchApp() 179 boolean success = mDevice.wait(Until.hasObject( in launchApp() 192 return mDevice.hasObject(By.pkg(appPackage).depth(0)); in isAppOpen() [all …]
|
/platform_testing/tests/perf/BootHelperApp/src/com/android/boothelper/ |
D | BootHelperTest.java | 49 private UiDevice mDevice; field in BootHelperTest 54 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 63 mDevice.waitForIdle(); in setupLockScreenPin() 69 mDevice.waitForIdle(); in setupLockScreenPin() 83 mDevice.pressBack(); in setupLockScreenPin() 102 mDevice.wakeUp(); in dismissKeyguard() 103 mDevice.waitForIdle(); in dismissKeyguard() 104 mDevice.pressMenu(); in dismissKeyguard() 105 mDevice.waitForIdle(); in dismissKeyguard() 110 mDevice.waitForIdle(); in enterTestPin() [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 …]
|
D | NotificationBundlingTests.java | 41 private UiDevice mDevice = null; field in NotificationBundlingTests 48 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 52 mHelper = new NotificationHelper(mDevice, getInstrumentation(), mNotificationManager); in setUp() 53 mDevice.pressHome(); in setUp() 56 mDevice.setOrientationNatural(); in setUp() 65 mDevice.pressHome(); in tearDown() 76 UiObject2 obj = mDevice.wait( in testBundlingNotification() 80 mDevice.wait(Until.findObject(By.res("android:id/expand_button")), LONG_TIMEOUT).click(); in testBundlingNotification() 81 obj = mDevice.wait(Until.findObject(By.textContains(lists.get(1).toString())), in testBundlingNotification() 108 mDevice.openNotification(); in testDismissIndividualNotification() [all …]
|
/platform_testing/utils/dpad/src/android/platform/test/utils/ |
D | DPadUtil.java | 34 private UiDevice mDevice; field in DPadUtil 38 mDevice = UiDevice.getInstance(instrumentation); in DPadUtil() 42 mDevice = uiDevice; in DPadUtil() 46 mDevice = uiDevice; in setUiDevice() 72 result = mDevice.pressDPadLeft(); in pressDPad() 75 result = mDevice.pressDPadRight(); in pressDPad() 78 result = mDevice.pressDPadUp(); in pressDPad() 81 result = mDevice.pressDPadDown(); in pressDPad() 125 boolean retVal = mDevice.pressKeyCode(keyCode); in pressKeyCodeAndWait() 128 mDevice.waitForIdle(); in pressKeyCodeAndWait() [all …]
|
/platform_testing/tests/jank/touch_latency_wear/src/com/android/wearable/touch/janktests/ |
D | TouchLatencyHelper.java | 47 private UiDevice mDevice = null; field in TouchLatencyHelper 54 private TouchLatencyHelper(UiDevice mDevice, Instrumentation instrumentation) { in TouchLatencyHelper() argument 55 this.mDevice = mDevice; in TouchLatencyHelper() 68 UiObject2 actionSettings = mDevice.wait(Until.findObject( in openBouncingBallActivity() 89 mDevice.pressBack(); in goBackHome() 96 mDevice.pressBack(); in goBackHome() 100 mDevice.pressBack(); in goBackHome() 104 mDevice.pressBack(); in goBackHome() 108 mDevice.pressBack(); in goBackHome() 114 String launcherPackageName = mDevice.getLauncherPackageName(); in waitForSysAppUiObject2() [all …]
|
/platform_testing/tests/jank/jankmicrobenchmark/src/com/android/jankmicrobenchmark/janktests/ |
D | ApiDemoJankTests.java | 50 private UiDevice mDevice; field in ApiDemoJankTests 56 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 57 mDevice.setOrientationNatural(); in setUp() 58 LauncherStrategyFactory.getInstance(mDevice).getLauncherStrategy().open(); in setUp() 63 mDevice.unfreezeRotation(); in tearDown() 70 if (mDevice.getProductName().equals("fugu")) { in getHomeScreen() 71 return mDevice.wait(Until.findObject(By.res(LEANBACK_LAUNCHER, "main_list_view")), in getHomeScreen() 75 String launcherPackage = mDevice.getLauncherPackageName(); in getHomeScreen() 76 return mDevice.wait(Until.findObject(By.res(launcherPackage,"workspace")), in getHomeScreen() 89 mDevice.waitForIdle(); in launchApiDemos() [all …]
|
/platform_testing/libraries/system-helpers/accessibility-helper/src/android/system/helpers/ |
D | AccessibilityScannerHelper.java | 48 private UiDevice mDevice = null; field in AccessibilityScannerHelper 54 mDevice = UiDevice.getInstance(instr); in AccessibilityScannerHelper() 125 UiObject2 swt = mDevice.wait(Until.findObject( in setAccessibilityScannerSetting() 134 UiObject2 okBtn = mDevice.wait(Until.findObject(By.text("OK")), SHORT_TIMEOUT); in setAccessibilityScannerSetting() 139 mDevice.pressBack(); in setAccessibilityScannerSetting() 150 UiObject2 auth1 = mDevice.wait(Until.findObject( in grantPermissions() 155 UiObject2 chk = mDevice.wait(Until.findObject( in grantPermissions() 159 mDevice.findObject(By.text("START NOW")).click(); in grantPermissions() 161 UiObject2 auth2 = mDevice.wait(Until.findObject( in grantPermissions() 166 UiObject2 tapOk = mDevice.wait(Until.findObject( in grantPermissions() [all …]
|
/platform_testing/tests/functional/permission/src/com/android/functional/permissiontests/ |
D | GenericAppPermissionTests.java | 42 private UiDevice mDevice = null; field in GenericAppPermissionTests 62 mDevice = UiDevice.getInstance(getInstrumentation()); in setUp() 65 mDevice.setOrientationNatural(); in setUp() 109 if (!mDevice.hasObject(By.pkg(PERMISSION_TEST_APP_PKG).depth(0))) { in testPermissionDialogAllow() 112 mDevice.wait(Until.findObject(By.text("GET CONTACT PERMISSION")), pHelper.TIMEOUT).click(); in testPermissionDialogAllow() 113 mDevice.wait(Until.findObject( in testPermissionDialogAllow() 122 if (!mDevice.hasObject(By.pkg(PERMISSION_TEST_APP_PKG).depth(0))) { in testPermissionDialogDenyFlow() 132 mDevice.wait(Until.findObject(getContactSelector), pHelper.TIMEOUT).click(); in testPermissionDialogDenyFlow() 133 UiObject2 dontAskChk = mDevice.wait(Until.findObject(dontAskChkSelector), pHelper.TIMEOUT); in testPermissionDialogDenyFlow() 135 mDevice.wait(Until.findObject(denySelctor), pHelper.TIMEOUT).click(); in testPermissionDialogDenyFlow() [all …]
|