diff options
author | 2024-11-12 11:38:44 +0900 | |
---|---|---|
committer | 2024-11-12 11:40:30 +0900 | |
commit | 0bfcd492721ae89cfa7c629243a87a95f1c4760a (patch) | |
tree | 3fe92e876d226a5f861549f7bba94fa505ae1ae6 /tests/FlickerTests | |
parent | 2a76c44a1ae6020e51b9c61e17bae4033d1063f3 (diff) |
Add functional test for drag-to-maximize
This CL adds a functional test for drag-to-maximize. Note that the test
assumes that the feature is enabled on the device. If not, the test is
skipped.
Bug: 378396431
Flag: EXEMPT add test
Test: MaximizeAppWindowWithDragToTopDragZoneTest
Change-Id: I957b57b517b70bbbacd46aa675b5e66bf78ea89e
Diffstat (limited to 'tests/FlickerTests')
-rw-r--r-- | tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt index 332b9b832037..5dfe74700636 100644 --- a/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt +++ b/tests/FlickerTests/test-apps/app-helpers/src/com/android/server/wm/flicker/helpers/DesktopModeAppHelper.kt @@ -347,6 +347,14 @@ open class DesktopModeAppHelper(private val innerHelper: IStandardAppHelper) : waitForTransitionToFullscreen(wmHelper) } + /** Maximize an app by dragging the app handle to the top drag zone. */ + fun maximizeAppWithDragToTopDragZone( + wmHelper: WindowManagerStateHelper, + device: UiDevice, + ) { + dragAppWindowToTopDragZone(wmHelper, device) + } + private fun dragAppWindowToTopDragZone(wmHelper: WindowManagerStateHelper, device: UiDevice) { val windowRect = wmHelper.getWindowRegion(innerHelper).bounds val displayRect = getDisplayRect(wmHelper) |