diff options
| author | 2021-03-18 11:42:42 +0000 | |
|---|---|---|
| committer | 2021-03-18 11:42:42 +0000 | |
| commit | 4cdcf4126512c23f7c414066ac5df302db1843f5 (patch) | |
| tree | 47548890efb78051ced5f2be67986476fb1f1fc9 | |
| parent | 4c5a91244ebcad794d7f76e000f19215023e578e (diff) | |
| parent | e4ef2478c5483691988444fa5bb2584431a5217b (diff) | |
Merge "Promote stable rotation tests to presubmit" into sc-dev
3 files changed, 39 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 6985b360c9cc..f037f1d19583 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,12 +17,14 @@ package com.android.server.wm.flicker.rotation import android.platform.test.annotations.Presubmit +import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.helpers.SimpleAppHelper +import org.junit.Assume import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -51,6 +53,26 @@ class ChangeAppRotationTest( } } + @FlakyTest(bugId = 151179149) + @Test + override fun focusDoesNotChange() { + super.focusDoesNotChange() + } + + @Presubmit + @Test + override fun navBarLayerRotatesAndScales() { + Assume.assumeFalse(testSpec.isRotated) + super.navBarLayerRotatesAndScales() + } + + @FlakyTest(bugId = 140855415) + @Test + fun navBarLayerRotatesAndScales_flaky() { + Assume.assumeTrue(testSpec.isRotated) + super.navBarLayerRotatesAndScales() + } + @Presubmit @Test fun screenshotLayerBecomesInvisible() { 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 e914f64bb6ca..6d2a9238bed5 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 @@ -18,7 +18,6 @@ package com.android.server.wm.flicker.rotation import android.app.Instrumentation import android.platform.test.annotations.Presubmit -import androidx.test.filters.FlakyTest import androidx.test.platform.app.InstrumentationRegistry import com.android.server.wm.flicker.FlickerBuilderProvider import com.android.server.wm.flicker.FlickerTestParameter @@ -74,13 +73,13 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter) testSpec.navBarWindowIsAlwaysVisible() } - @FlakyTest(bugId = 140855415) + @Presubmit @Test open fun navBarLayerIsAlwaysVisible() { testSpec.navBarLayerIsAlwaysVisible() } - @FlakyTest(bugId = 140855415) + @Presubmit @Test open fun navBarLayerRotatesAndScales() { testSpec.navBarLayerRotatesAndScales( @@ -93,20 +92,20 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter) testSpec.statusBarWindowIsAlwaysVisible() } - @FlakyTest(bugId = 140855415) + @Presubmit @Test open fun statusBarLayerIsAlwaysVisible() { testSpec.statusBarLayerIsAlwaysVisible() } - @FlakyTest(bugId = 140855415) + @Presubmit @Test open fun statusBarLayerRotatesScales() { testSpec.statusBarLayerRotatesScales( testSpec.config.startRotation, testSpec.config.endRotation) } - @FlakyTest(bugId = 140855415) + @Presubmit @Test open fun visibleLayersShownMoreThanOneConsecutiveEntry() { testSpec.assertLayers { @@ -129,13 +128,13 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter) testSpec.config.endRotation, allStates = false) } - @FlakyTest(bugId = 151179149) + @Presubmit @Test open fun focusDoesNotChange() { testSpec.focusDoesNotChange() } - @FlakyTest(bugId = 140855415) + @Presubmit @Test open fun appLayerRotates_StartingPos() { testSpec.assertLayersStart { @@ -143,7 +142,7 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter) } } - @FlakyTest(bugId = 140855415) + @Presubmit @Test open fun appLayerRotates_EndingPos() { testSpec.assertLayersEnd { 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 45d3006b9481..fe444bdecba7 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 @@ -22,7 +22,6 @@ import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory -import com.android.server.wm.flicker.appWindowAlwaysVisibleOnTop import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.helpers.SeamlessRotationAppHelper import com.android.server.wm.flicker.layerAlwaysVisible @@ -61,26 +60,24 @@ class SeamlessAppRotationTest( @FlakyTest(bugId = 140855415) @Test - override fun navBarWindowIsAlwaysVisible() = super.navBarWindowIsAlwaysVisible() + override fun navBarLayerRotatesAndScales() { + super.navBarLayerRotatesAndScales() + } @FlakyTest(bugId = 140855415) @Test - override fun statusBarWindowIsAlwaysVisible() = super.statusBarWindowIsAlwaysVisible() - - @FlakyTest(bugId = 147659548) - @Test - override fun noUncoveredRegions() = super.noUncoveredRegions() + override fun statusBarLayerRotatesScales() { + super.statusBarLayerRotatesScales() + } @Presubmit @Test - fun appWindowAlwaysVisibleOnTop() = testSpec.appWindowAlwaysVisibleOnTop(testApp.`package`) + fun appLayerAlwaysVisible() { + testSpec.layerAlwaysVisible(testApp.`package`) + } @Presubmit @Test - fun layerAlwaysVisible() = testSpec.layerAlwaysVisible(testApp.`package`) - - @FlakyTest(bugId = 147659548) - @Test fun appLayerRotates() { testSpec.assertLayers { this.coversExactly(startingPos, testApp.`package`) |