summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-08-22 10:07:41 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-08-22 10:07:41 +0000
commit75dc3353569ce25124b2396b8846dd0a1c750fcc (patch)
treeef97a47f551da4bf17863221b079c0d06755cd94
parent877cf44d430a02cbac9df097858f47885fb73d5f (diff)
parent3c143661068e5656bf214fac0209d49a3e28a374 (diff)
Merge "Add scaled resizing non-resizable app scenario" into main
-rw-r--r--libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/ResizeAppWithCornerResize.kt29
1 files changed, 24 insertions, 5 deletions
diff --git a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/ResizeAppWithCornerResize.kt b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/ResizeAppWithCornerResize.kt
index 63e7387f7a8a..03d970fe4f39 100644
--- a/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/ResizeAppWithCornerResize.kt
+++ b/libs/WindowManager/Shell/tests/e2e/desktopmode/scenarios/src/com/android/wm/shell/scenarios/ResizeAppWithCornerResize.kt
@@ -25,6 +25,7 @@ import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.uiautomator.UiDevice
import com.android.launcher3.tapl.LauncherInstrumentation
import com.android.server.wm.flicker.helpers.DesktopModeAppHelper
+import com.android.server.wm.flicker.helpers.NonResizeableAppHelper
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import com.android.window.flags.Flags
import com.android.wm.shell.Utils
@@ -40,15 +41,24 @@ import org.junit.runners.BlockJUnit4ClassRunner
@Postsubmit
open class ResizeAppWithCornerResize
@JvmOverloads
-constructor(val rotation: Rotation = Rotation.ROTATION_0,
+constructor(
+ val rotation: Rotation = Rotation.ROTATION_0,
val horizontalChange: Int = 50,
- val verticalChange: Int = -50) {
+ val verticalChange: Int = -50,
+ val appProperty: AppProperty = AppProperty.STANDARD
+) {
private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
private val tapl = LauncherInstrumentation()
private val wmHelper = WindowManagerStateHelper(instrumentation)
private val device = UiDevice.getInstance(instrumentation)
- private val testApp = DesktopModeAppHelper(SimpleAppHelper(instrumentation))
+ private val testApp =
+ DesktopModeAppHelper(
+ when (appProperty) {
+ AppProperty.STANDARD -> SimpleAppHelper(instrumentation)
+ AppProperty.NON_RESIZABLE -> NonResizeableAppHelper(instrumentation)
+ }
+ )
@Rule
@JvmField
@@ -64,15 +74,24 @@ constructor(val rotation: Rotation = Rotation.ROTATION_0,
@Test
open fun resizeAppWithCornerResize() {
- testApp.cornerResize(wmHelper,
+ testApp.cornerResize(
+ wmHelper,
device,
DesktopModeAppHelper.Corners.RIGHT_TOP,
horizontalChange,
- verticalChange)
+ verticalChange
+ )
}
@After
fun teardown() {
testApp.exit(wmHelper)
}
+
+ companion object {
+ enum class AppProperty {
+ STANDARD,
+ NON_RESIZABLE
+ }
+ }
}