From 5b0f9fa4f5b214b50d3b3a588d00e8083b7c9db5 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Wed, 24 Feb 2021 11:29:45 +0100 Subject: [PATCH] 3-button mode tests for rotation tests Tests now run in: - Portrait to Landscape + 3 Button - Landscape to Portrait + 3 Button - Portrait to Landscape + Gestural - Landscape to Portrait + Gestural Test: atest FlickerTests Bug: 167521849 Change-Id: I997c7af9c4895452aafb1f8e3b13b15168697963 --- .../server/wm/flicker/rotation/ChangeAppRotationTest.kt | 8 +------- .../server/wm/flicker/rotation/RotationTransition.kt | 7 ------- .../server/wm/flicker/rotation/SeamlessAppRotationTest.kt | 8 +------- 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt index 80b2237927351..6985b360c9cc8 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/ChangeAppRotationTest.kt @@ -17,7 +17,6 @@ package com.android.server.wm.flicker.rotation import android.platform.test.annotations.Presubmit -import android.view.WindowManagerPolicyConstants import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory import com.android.server.wm.flicker.FlickerTestParameter @@ -71,12 +70,7 @@ class ChangeAppRotationTest( @JvmStatic fun getParams(): Collection { return FlickerTestParameterFactory.getInstance() - .getConfigRotationTests( - repetitions = 5, - supportedNavigationModes = listOf( - WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL_OVERLAY - ) - ) + .getConfigRotationTests(repetitions = 5) } } } \ No newline at end of file diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/RotationTransition.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/RotationTransition.kt index 24417f4a5d3ef..e914f64bb6ca4 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/RotationTransition.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/RotationTransition.kt @@ -28,12 +28,10 @@ import com.android.server.wm.flicker.focusDoesNotChange import com.android.server.wm.flicker.helpers.StandardAppHelper import com.android.server.wm.flicker.helpers.WindowUtils import com.android.server.wm.flicker.helpers.setRotation -import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.navBarLayerIsAlwaysVisible import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsAlwaysVisible import com.android.server.wm.flicker.noUncoveredRegions -import com.android.server.wm.flicker.repetitions import com.android.server.wm.flicker.startRotation import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible import com.android.server.wm.flicker.statusBarLayerRotatesScales @@ -48,12 +46,7 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter) protected val endingPos get() = WindowUtils.getDisplayBounds(testSpec.config.endRotation) protected open val transition: FlickerBuilder.(Map) -> Unit = { - withTestName { testSpec.name } - repeat { testSpec.config.repetitions } setup { - test { - device.wakeUpAndGoToHomeScreen() - } eachRun { this.setRotation(testSpec.config.startRotation) } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt index dd7103cb28ea0..45d3006b94812 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/rotation/SeamlessAppRotationTest.kt @@ -17,7 +17,6 @@ package com.android.server.wm.flicker.rotation import android.platform.test.annotations.Presubmit -import android.view.WindowManagerPolicyConstants import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -104,12 +103,7 @@ class SeamlessAppRotationTest( @JvmStatic private fun getConfigurations(): List { - return testFactory.getConfigRotationTests( - repetitions = 2, - supportedNavigationModes = listOf( - WindowManagerPolicyConstants.NAV_BAR_MODE_GESTURAL_OVERLAY - ) - ).flatMap { + return testFactory.getConfigRotationTests(repetitions = 2).flatMap { val defaultRun = it.createConfig(starveUiThread = false) val busyUiRun = it.createConfig(starveUiThread = true) listOf(