From 2ab6666ae7d085b38831716657c02046cf0cb312 Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Fri, 27 Aug 2021 13:49:50 +0200 Subject: [PATCH] Promote stable postsubmit tests to presubmit Tests were stable in the dashboard for a few days. Bug: 196213706 Test: atest FlickerTests WMShellFlickerTests Change-Id: I42e688e61b26f853776d635e1412bdb02b293e40 --- .../wm/shell/flicker/pip/EnterPipTest.kt | 5 +-- .../pip/EnterPipToOtherOrientationTest.kt | 3 +- .../pip/ExitPipViaExpandButtonClickTest.kt | 14 ------- .../flicker/pip/ExpandPipOnDoubleClickTest.kt | 7 ++-- .../pip/MovePipShelfHeightTransition.kt | 9 ++-- .../launch/OpenAppNonResizeableTest.kt | 16 ------- .../QuickSwitchFromLauncherTest.kt | 42 +++++++++---------- 7 files changed, 32 insertions(+), 64 deletions(-) diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt index f84908e7d1509..046972d246e6d 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt @@ -16,7 +16,6 @@ package com.android.wm.shell.flicker.pip -import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.FlakyTest @@ -105,7 +104,7 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) { * Checks that the pip app layer remains inside the display bounds throughout the whole * animation */ - @Postsubmit + @Presubmit @Test fun pipLayerRemainInsideVisibleBounds() { testSpec.assertLayers { @@ -116,7 +115,7 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) { /** * Checks that the visible region of [pipApp] always reduces during the animation */ - @Postsubmit + @Presubmit @Test fun pipLayerReduces() { val layerName = pipApp.component.toLayerName() diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt index 24a0bfcbbe9e7..097ccb8cd734f 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt @@ -16,7 +16,6 @@ package com.android.wm.shell.flicker.pip -import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.FlakyTest @@ -119,7 +118,7 @@ class EnterPipToOtherOrientationTest( * Checks that the [WindowManagerStateHelper.STATUS_BAR_COMPONENT] has the correct position at * the start and end of the transition */ - @Postsubmit + @Presubmit @Test override fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales(Surface.ROTATION_90, Surface.ROTATION_0) diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaExpandButtonClickTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaExpandButtonClickTest.kt index 596c92a70498e..fa100b5b25ab8 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaExpandButtonClickTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaExpandButtonClickTest.kt @@ -16,7 +16,6 @@ package com.android.wm.shell.flicker.pip -import android.platform.test.annotations.Postsubmit import android.view.Surface import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -26,7 +25,6 @@ import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.traces.parser.toWindowName import org.junit.FixMethodOrder -import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters import org.junit.runners.Parameterized @@ -78,18 +76,6 @@ class ExitPipViaExpandButtonClickTest( } } - @Postsubmit - @Test - override fun pipAppCoversFullScreenAtEnd() = super.pipAppCoversFullScreenAtEnd() - - @Postsubmit - @Test - override fun showBothAppLayersThenHidePip() = super.showBothAppLayersThenHidePip() - - @Postsubmit - @Test - override fun showBothAppWindowsThenHidePip() = super.showBothAppWindowsThenHidePip() - companion object { /** * Creates the test configurations. diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt index c525d46c83e67..89b2c400e80ae 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExpandPipOnDoubleClickTest.kt @@ -80,7 +80,7 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition * Checks that the pip app layer remains inside the display bounds throughout the whole * animation */ - @Postsubmit + @Presubmit @Test fun pipLayerRemainInsideVisibleBounds() { testSpec.assertLayers { @@ -91,6 +91,7 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition /** * Checks [pipApp] window remains visible throughout the animation */ + @Postsubmit @Test fun pipWindowIsAlwaysVisible() { testSpec.assertWm { @@ -101,7 +102,7 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition /** * Checks [pipApp] layer remains visible throughout the animation */ - @Postsubmit + @Presubmit @Test fun pipLayerIsAlwaysVisible() { testSpec.assertLayers { @@ -112,7 +113,7 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition /** * Checks that the visible region of [pipApp] always expands during the animation */ - @Postsubmit + @Presubmit @Test fun pipLayerExpands() { val layerName = pipApp.component.toLayerName() diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt index 934255f73994e..ed04fc9474353 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipShelfHeightTransition.kt @@ -16,7 +16,6 @@ package com.android.wm.shell.flicker.pip -import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import com.android.launcher3.tapl.LauncherInstrumentation import com.android.server.wm.flicker.FlickerTestParameter @@ -43,7 +42,7 @@ abstract class MovePipShelfHeightTransition( /** * Checks [pipApp] window remains visible throughout the animation */ - @Postsubmit + @Presubmit @Test open fun pipWindowIsAlwaysVisible() { testSpec.assertWm { @@ -54,7 +53,7 @@ abstract class MovePipShelfHeightTransition( /** * Checks [pipApp] layer remains visible throughout the animation */ - @Postsubmit + @Presubmit @Test open fun pipLayerIsAlwaysVisible() { testSpec.assertLayers { @@ -66,7 +65,7 @@ abstract class MovePipShelfHeightTransition( * Checks that the pip app window remains inside the display bounds throughout the whole * animation */ - @Postsubmit + @Presubmit @Test open fun pipWindowRemainInsideVisibleBounds() { testSpec.assertWm { @@ -78,7 +77,7 @@ abstract class MovePipShelfHeightTransition( * Checks that the pip app layer remains inside the display bounds throughout the whole * animation */ - @Postsubmit + @Presubmit @Test open fun pipLayerRemainInsideVisibleBounds() { testSpec.assertLayers { diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt index a7311a6db6903..93a58be96091b 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppNonResizeableTest.kt @@ -112,22 +112,6 @@ class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : OpenAppTransiti @Test override fun navBarWindowIsVisible() = super.navBarWindowIsVisible() - @Postsubmit - @Test - override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales() - - @Postsubmit - @Test - override fun statusBarWindowIsVisible() = super.statusBarWindowIsVisible() - - @Postsubmit - @Test - override fun statusBarLayerIsVisible() = super.statusBarLayerIsVisible() - - @Postsubmit - @Test - override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() - @FlakyTest @Test override fun visibleWindowsShownMoreThanOneConsecutiveEntry() = diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchFromLauncherTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchFromLauncherTest.kt index 6b9ab446e0583..ca8f8af2df949 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchFromLauncherTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/quickswitch/QuickSwitchFromLauncherTest.kt @@ -17,7 +17,7 @@ package com.android.server.wm.flicker.quickswitch import android.app.Instrumentation -import android.platform.test.annotations.Postsubmit +import android.platform.test.annotations.Presubmit import android.platform.test.annotations.RequiresDevice import android.view.Surface import android.view.WindowManagerPolicyConstants @@ -106,7 +106,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that [testApp] windows fill the entire screen (i.e. is "fullscreen") at the end of the * transition once we have fully quick switched from the launcher back to the [testApp]. */ - @Postsubmit + @Presubmit @Test fun endsWithAppWindowsCoveringFullScreen() { testSpec.assertWmEnd { @@ -118,7 +118,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that [testApp] layers fill the entire screen (i.e. is "fullscreen") at the end of the * transition once we have fully quick switched from the launcher back to the [testApp]. */ - @Postsubmit + @Presubmit @Test fun endsWithAppLayersCoveringFullScreen() { testSpec.assertLayersEnd { @@ -130,7 +130,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that [testApp] is the top window at the end of the transition once we have fully quick * switched from the launcher back to the [testApp]. */ - @Postsubmit + @Presubmit @Test fun endsWithAppBeingOnTop() { testSpec.assertWmEnd { @@ -141,7 +141,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { /** * Checks that the transition starts with the home activity being tagged as visible. */ - @Postsubmit + @Presubmit @Test fun startsWithHomeActivityFlaggedVisible() { testSpec.assertWmStart { @@ -153,7 +153,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that the transition starts with the launcher windows filling/covering exactly the * entirety of the display. */ - @Postsubmit + @Presubmit @Test fun startsWithLauncherWindowsCoverFullScreen() { testSpec.assertWmStart { @@ -165,7 +165,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that the transition starts with the launcher layers filling/covering exactly the * entirety of the display. */ - @Postsubmit + @Presubmit @Test fun startsWithLauncherLayersCoverFullScreen() { testSpec.assertLayersStart { @@ -176,7 +176,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { /** * Checks that the transition starts with the launcher being the top window. */ - @Postsubmit + @Presubmit @Test fun startsWithLauncherBeingOnTop() { testSpec.assertWmStart { @@ -188,7 +188,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that the transition ends with the home activity being flagged as not visible. By this * point we should have quick switched away from the launcher back to the [testApp]. */ - @Postsubmit + @Presubmit @Test fun endsWithHomeActivityFlaggedInvisible() { testSpec.assertWmEnd { @@ -200,7 +200,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that [testApp]'s window starts off invisible and becomes visible at some point before * the end of the transition and then stays visible until the end of the transition. */ - @Postsubmit + @Presubmit @Test fun appWindowBecomesAndStaysVisible() { testSpec.assertWm { @@ -214,7 +214,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that [testApp]'s layer starts off invisible and becomes visible at some point before * the end of the transition and then stays visible until the end of the transition. */ - @Postsubmit + @Presubmit @Test fun appLayerBecomesAndStaysVisible() { testSpec.assertLayers { @@ -228,7 +228,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that the launcher window starts off visible and becomes invisible at some point before * the end of the transition and then stays invisible until the end of the transition. */ - @Postsubmit + @Presubmit @Test fun launcherWindowBecomesAndStaysInvisible() { testSpec.assertWm { @@ -242,7 +242,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that the launcher layer starts off visible and becomes invisible at some point before * the end of the transition and then stays invisible until the end of the transition. */ - @Postsubmit + @Presubmit @Test fun launcherLayerBecomesAndStaysInvisible() { testSpec.assertLayers { @@ -256,7 +256,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that the launcher window is visible at least until the app window is visible. Ensures * that at any point, either the launcher or [testApp] windows are at least partially visible. */ - @Postsubmit + @Presubmit @Test fun appWindowIsVisibleOnceLauncherWindowIsInvisible() { testSpec.assertWm { @@ -272,7 +272,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * Checks that the launcher layer is visible at least until the app layer is visible. Ensures * that at any point, either the launcher or [testApp] layers are at least partially visible. */ - @Postsubmit + @Presubmit @Test fun appLayerIsVisibleOnceLauncherLayerIsInvisible() { testSpec.assertLayers { @@ -287,14 +287,14 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { /** * Checks that the navbar window is visible throughout the entire transition. */ - @Postsubmit + @Presubmit @Test fun navBarWindowIsAlwaysVisible() = testSpec.navBarWindowIsVisible() /** * Checks that the navbar layer is visible throughout the entire transition. */ - @Postsubmit + @Presubmit @Test fun navBarLayerAlwaysIsVisible() = testSpec.navBarLayerIsVisible() @@ -303,7 +303,7 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { * * NOTE: This doesn't check that the navbar is visible or not. */ - @Postsubmit + @Presubmit @Test fun navbarIsAlwaysInRightPosition() = testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation) @@ -311,21 +311,21 @@ class QuickSwitchFromLauncherTest(private val testSpec: FlickerTestParameter) { /** * Checks that the status bar window is visible throughout the entire transition. */ - @Postsubmit + @Presubmit @Test fun statusBarWindowIsAlwaysVisible() = testSpec.statusBarWindowIsVisible() /** * Checks that the status bar layer is visible throughout the entire transition. */ - @Postsubmit + @Presubmit @Test fun statusBarLayerIsAlwaysVisible() = testSpec.statusBarLayerIsVisible() /** * Checks that the screen is always fully covered by visible layers throughout the transition. */ - @Postsubmit + @Presubmit @Test fun screenIsAlwaysFilled() = testSpec.entireScreenCovered()