From 7fdad8f97a9e18cf060eec1f9df64e344ea7a59a Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Fri, 12 Nov 2021 15:29:24 +0100 Subject: [PATCH] Disable tests not compatible with current shell transitions Not all tests are working when wm shell is enabled. However, it is important to put the ones that are working in presubmit/postsubmit to prevent regressions Test: atest FlickerTests WMShellFlickerTests with shell transitions on Bug: 206753786 Bug: 206669574 Bug: 206086894 Bug: 204574221 Bug: 204570898 Bug: 206085788 Bug: 206090480 Bug: 206094140 Bug: 206101151 Change-Id: I3e7f6c8c044221c403a0a4030eb7806f2c8b63a5 --- ...AppPairsTestCannotPairNonResizeableApps.kt | 8 +++- ...AppPairsTestPairPrimaryAndSecondaryApps.kt | 8 +++- ...ppPairsTestSupportPairNonResizeableApps.kt | 8 +++- ...pPairsTestUnpairPrimaryAndSecondaryApps.kt | 8 +++- .../LegacySplitScreenToLauncher.kt | 8 +++- .../ResizeLegacySplitScreen.kt | 8 +++- ...RotateOneLaunchedAppAndEnterSplitScreen.kt | 8 +++- .../RotateOneLaunchedAppInSplitScreenMode.kt | 8 +++- ...RotateTwoLaunchedAppAndEnterSplitScreen.kt | 8 +++- .../RotateTwoLaunchedAppInSplitScreenMode.kt | 8 +++- .../wm/shell/flicker/pip/EnterPipTest.kt | 11 +++++ .../pip/EnterPipToOtherOrientationTest.kt | 9 +++- .../flicker/pip/ExitPipToAppTransition.kt | 11 +++++ .../pip/ExitPipViaExpandButtonClickTest.kt | 13 +++++ .../shell/flicker/pip/ExitPipViaIntentTest.kt | 13 +++++ .../pip/ExitPipWithDismissButtonTest.kt | 20 ++++++++ .../flicker/pip/ExitPipWithSwipeDownTest.kt | 8 +++- .../flicker/pip/ExpandPipOnDoubleClickTest.kt | 9 ++++ .../pip/MovePipDownShelfHeightChangeTest.kt | 13 +++++ .../pip/MovePipUpShelfHeightChangeTest.kt | 13 +++++ .../wm/shell/flicker/pip/PipKeyboardTest.kt | 11 +++++ .../flicker/pip/PipLegacySplitScreenTest.kt | 9 ++++ .../wm/shell/flicker/pip/PipRotationTest.kt | 9 ++++ .../SetRequestedOrientationWhilePinnedTest.kt | 8 +++- .../wm/shell/flicker/pip/tv/TvPipTestBase.kt | 4 +- .../flicker/close/CloseAppBackButtonTest.kt | 30 ++++++++++++ .../flicker/close/CloseAppHomeButtonTest.kt | 30 ++++++++++++ .../ime/CloseImeAutoOpenWindowToAppTest.kt | 8 +++- .../ime/CloseImeAutoOpenWindowToHomeTest.kt | 14 +++++- .../wm/flicker/ime/CloseImeWindowToAppTest.kt | 14 ++++-- .../flicker/ime/CloseImeWindowToHomeTest.kt | 14 +++++- .../wm/flicker/ime/OpenImeWindowTest.kt | 8 +++- .../wm/flicker/ime/ReOpenImeWindowTest.kt | 38 ++++++++++----- .../wm/flicker/launch/OpenAppColdTest.kt | 11 +++++ .../flicker/launch/OpenAppFromOverviewTest.kt | 48 +++++++++++++++++-- .../launch/OpenAppNonResizeableTest.kt | 12 ++++- .../wm/flicker/launch/OpenAppWarmTest.kt | 29 +++++++++++ .../flicker/rotation/ChangeAppRotationTest.kt | 8 +++- .../rotation/SeamlessAppRotationTest.kt | 17 +++++++ 39 files changed, 479 insertions(+), 43 deletions(-) diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestCannotPairNonResizeableApps.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestCannotPairNonResizeableApps.kt index ecc2d31ab8b88..1d463d57e44ce 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestCannotPairNonResizeableApps.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestCannotPairNonResizeableApps.kt @@ -24,11 +24,13 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.wm.shell.flicker.appPairsDividerIsInvisibleAtEnd import com.android.wm.shell.flicker.helpers.AppPairsHelper import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.resetMultiWindowConfig import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.setSupportsNonResizableMultiWindow import org.junit.After +import org.junit.Assume.assumeFalse import org.junit.Before import org.junit.FixMethodOrder import org.junit.Test @@ -82,7 +84,11 @@ class AppPairsTestCannotPairNonResizeableApps( @FlakyTest @Test - override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestPairPrimaryAndSecondaryApps.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestPairPrimaryAndSecondaryApps.kt index 04c82e5f9afb1..10cf0b7c4773a 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestPairPrimaryAndSecondaryApps.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestPairPrimaryAndSecondaryApps.kt @@ -24,10 +24,12 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.wm.shell.flicker.APP_PAIR_SPLIT_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appPairsDividerIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.AppPairsHelper import com.android.wm.shell.flicker.helpers.AppPairsHelper.Companion.waitAppsShown +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -67,7 +69,11 @@ class AppPairsTestPairPrimaryAndSecondaryApps( @FlakyTest @Test - override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestSupportPairNonResizeableApps.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestSupportPairNonResizeableApps.kt index b7d3ba6f737a3..722ec34670cf2 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestSupportPairNonResizeableApps.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestSupportPairNonResizeableApps.kt @@ -24,11 +24,13 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.wm.shell.flicker.appPairsDividerIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.AppPairsHelper import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.resetMultiWindowConfig import com.android.wm.shell.flicker.helpers.MultiWindowHelper.Companion.setSupportsNonResizableMultiWindow import org.junit.After +import org.junit.Assume.assumeFalse import org.junit.Before import org.junit.FixMethodOrder import org.junit.Test @@ -86,7 +88,11 @@ class AppPairsTestSupportPairNonResizeableApps( @FlakyTest @Test - override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestUnpairPrimaryAndSecondaryApps.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestUnpairPrimaryAndSecondaryApps.kt index f6ce3d4f41c57..38c008c14a78d 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestUnpairPrimaryAndSecondaryApps.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/apppairs/AppPairsTestUnpairPrimaryAndSecondaryApps.kt @@ -25,10 +25,12 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.wm.shell.flicker.APP_PAIR_SPLIT_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appPairsDividerIsInvisibleAtEnd import com.android.wm.shell.flicker.helpers.AppPairsHelper import com.android.wm.shell.flicker.helpers.AppPairsHelper.Companion.waitAppsShown +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -71,7 +73,11 @@ class AppPairsTestUnpairPrimaryAndSecondaryApps( @FlakyTest @Test - override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncher.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncher.kt index 5fe13e002b217..a787f2bdfc811 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncher.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/LegacySplitScreenToLauncher.kt @@ -27,6 +27,7 @@ import com.android.server.wm.flicker.annotation.Group2 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.entireScreenCovered import com.android.server.wm.flicker.helpers.exitSplitScreen +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.launchSplitScreen import com.android.server.wm.flicker.helpers.openQuickStepAndClearRecentAppsFromOverview import com.android.server.wm.flicker.helpers.setRotation @@ -40,6 +41,7 @@ import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.server.wm.traces.common.FlickerComponentName import com.android.wm.shell.flicker.dockedStackDividerBecomesInvisible import com.android.wm.shell.flicker.helpers.SimpleAppHelper +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -110,7 +112,11 @@ class LegacySplitScreenToLauncher( @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ResizeLegacySplitScreen.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ResizeLegacySplitScreen.kt index a238bc2ed6955..6041e231330bb 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ResizeLegacySplitScreen.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/ResizeLegacySplitScreen.kt @@ -30,6 +30,7 @@ import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.entireScreenCovered import com.android.server.wm.flicker.helpers.ImeAppHelper import com.android.server.wm.flicker.helpers.WindowUtils +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.launchSplitScreen import com.android.server.wm.flicker.helpers.resizeSplitScreen import com.android.server.wm.flicker.helpers.setRotation @@ -44,6 +45,7 @@ import com.android.server.wm.traces.parser.toFlickerComponent import com.android.wm.shell.flicker.DOCKED_STACK_DIVIDER_COMPONENT import com.android.wm.shell.flicker.helpers.SimpleAppHelper import com.android.wm.shell.flicker.testapp.Components +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -134,7 +136,11 @@ class ResizeLegacySplitScreen( fun navBarLayerRotatesAndScales() = testSpec.navBarLayerRotatesAndScales() @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Test fun topAppLayerIsAlwaysVisible() { diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppAndEnterSplitScreen.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppAndEnterSplitScreen.kt index 50cd5487d9cd0..e44d7d642cc61 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppAndEnterSplitScreen.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppAndEnterSplitScreen.kt @@ -25,6 +25,7 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group2 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.launchSplitScreen import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.navBarLayerRotatesAndScales @@ -34,6 +35,7 @@ import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.wm.shell.flicker.dockedStackDividerIsVisibleAtEnd import com.android.wm.shell.flicker.dockedStackPrimaryBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -77,7 +79,11 @@ class RotateOneLaunchedAppAndEnterSplitScreen( @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppInSplitScreenMode.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppInSplitScreenMode.kt index 8d5222585e383..d33d92bef884b 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppInSplitScreenMode.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateOneLaunchedAppInSplitScreenMode.kt @@ -25,6 +25,7 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group2 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.launchSplitScreen import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.navBarLayerRotatesAndScales @@ -34,6 +35,7 @@ import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.wm.shell.flicker.dockedStackDividerIsVisibleAtEnd import com.android.wm.shell.flicker.dockedStackPrimaryBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -76,7 +78,11 @@ class RotateOneLaunchedAppInSplitScreenMode( @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppAndEnterSplitScreen.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppAndEnterSplitScreen.kt index 070f6361dc231..ece68dfc956d5 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppAndEnterSplitScreen.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppAndEnterSplitScreen.kt @@ -24,6 +24,7 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group2 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.launchSplitScreen import com.android.server.wm.flicker.helpers.reopenAppFromOverview import com.android.server.wm.flicker.helpers.setRotation @@ -35,6 +36,7 @@ import com.android.wm.shell.flicker.dockedStackDividerIsVisibleAtEnd import com.android.wm.shell.flicker.dockedStackPrimaryBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.dockedStackSecondaryBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -85,7 +87,11 @@ class RotateTwoLaunchedAppAndEnterSplitScreen( @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppInSplitScreenMode.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppInSplitScreenMode.kt index fabbd260c9e7b..127301fa67e40 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppInSplitScreenMode.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/legacysplitscreen/RotateTwoLaunchedAppInSplitScreenMode.kt @@ -25,6 +25,7 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group2 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.launchSplitScreen import com.android.server.wm.flicker.helpers.reopenAppFromOverview import com.android.server.wm.flicker.helpers.setRotation @@ -36,6 +37,7 @@ import com.android.wm.shell.flicker.dockedStackDividerIsVisibleAtEnd import com.android.wm.shell.flicker.dockedStackPrimaryBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.dockedStackSecondaryBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -91,7 +93,11 @@ class RotateTwoLaunchedAppInSplitScreenMode( @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @FlakyTest @Test 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 33626d04addb5..c439922063ac2 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 @@ -26,6 +26,8 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.LAUNCHER_COMPONENT import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -65,6 +67,15 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) { } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + /** * Checks [pipApp] window remains visible throughout the animation */ 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 791505baee729..f923a23992cb5 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 @@ -27,6 +27,7 @@ import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.entireScreenCovered import com.android.server.wm.flicker.helpers.WindowUtils +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.traces.common.FlickerComponentName @@ -35,6 +36,7 @@ import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Com import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT import com.android.wm.shell.flicker.testapp.Components.PipActivity.ACTION_ENTER_PIP import com.android.wm.shell.flicker.testapp.Components.FixedActivity.EXTRA_FIXED_ORIENTATION +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -119,7 +121,11 @@ class EnterPipToOtherOrientationTest( */ @Presubmit @Test - override fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } /** * Checks that all parts of the screen are covered at the start and end of the transition @@ -204,6 +210,7 @@ class EnterPipToOtherOrientationTest( @Presubmit @Test fun testAppPlusPipLayerCoversFullScreenOnEnd() { + // This test doesn't work in shell transitions because of b/206669574 testSpec.assertLayersEnd { val pipRegion = visibleRegion(pipApp.component).region visibleRegion(testApp.component) diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt index 82674424bba05..3e7e2f542a4c1 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipToAppTransition.kt @@ -18,7 +18,9 @@ package com.android.wm.shell.flicker.pip import android.platform.test.annotations.Presubmit import com.android.server.wm.flicker.FlickerTestParameter +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.wm.shell.flicker.helpers.FixedAppHelper +import org.junit.Assume.assumeFalse import org.junit.Test /** @@ -27,6 +29,15 @@ import org.junit.Test abstract class ExitPipToAppTransition(testSpec: FlickerTestParameter) : PipTransition(testSpec) { protected val testApp = FixedAppHelper(instrumentation) + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + /** * Checks that the pip app window remains inside the display bounds throughout the whole * animation 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 5f29dbc2d269e..4d63d14c77da0 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,6 +16,7 @@ package com.android.wm.shell.flicker.pip +import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -23,7 +24,10 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder +import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters import org.junit.runners.Parameterized @@ -75,6 +79,15 @@ class ExitPipViaExpandButtonClickTest( } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + companion object { /** * Creates the test configurations. diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaIntentTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaIntentTest.kt index 00ccf26bacbe2..030e04051b086 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaIntentTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipViaIntentTest.kt @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip +import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -23,7 +24,10 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder +import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters import org.junit.runners.Parameterized @@ -72,6 +76,15 @@ class ExitPipViaIntentTest(testSpec: FlickerTestParameter) : ExitPipToAppTransit } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + companion object { /** * Creates the test configurations. diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithDismissButtonTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithDismissButtonTest.kt index b0b11e936d96a..2def9797fb624 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithDismissButtonTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithDismissButtonTest.kt @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip +import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -23,7 +24,11 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse +import org.junit.Before import org.junit.FixMethodOrder +import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters import org.junit.runners.Parameterized @@ -60,6 +65,21 @@ class ExitPipWithDismissButtonTest(testSpec: FlickerTestParameter) : ExitPipTran } } + @Before + fun onBefore() { + // This CUJ don't work in shell transitions because of b/204570898 b/204562589 + assumeFalse(isShellTransitionsEnabled) + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + companion object { /** * Creates the test configurations. diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithSwipeDownTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithSwipeDownTest.kt index f4eb70122a4da..9191d0ef27cc5 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithSwipeDownTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithSwipeDownTest.kt @@ -25,7 +25,9 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.statusBarLayerRotatesScales +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -96,7 +98,11 @@ class ExitPipWithSwipeDownTest(testSpec: FlickerTestParameter) : ExitPipTransiti @Presubmit @Test - override fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test 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 f196764295c2d..3511cc23c94d0 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 @@ -26,6 +26,9 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.LAUNCHER_COMPONENT import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse +import org.junit.Before import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -62,6 +65,12 @@ class ExpandPipOnDoubleClickTest(testSpec: FlickerTestParameter) : PipTransition } } + @Before + fun onBefore() { + // This CUJ don't work in shell transitions because of b/204570898 b/204562589 + assumeFalse(isShellTransitionsEnabled) + } + /** * Checks that the pip app window remains inside the display bounds throughout the whole * animation diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownShelfHeightChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownShelfHeightChangeTest.kt index d9685f3718fa1..10a542f6c19af 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownShelfHeightChangeTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipDownShelfHeightChangeTest.kt @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip +import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -23,8 +24,11 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.traces.RegionSubject +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder +import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters import org.junit.runners.Parameterized @@ -78,6 +82,15 @@ class MovePipDownShelfHeightChangeTest( current.isHigherOrEqual(previous.region) } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + companion object { /** * Creates the test configurations. diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpShelfHeightChangeTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpShelfHeightChangeTest.kt index c6b42ea86078f..cb6ba0e6f70e8 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpShelfHeightChangeTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/MovePipUpShelfHeightChangeTest.kt @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip +import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -23,8 +24,11 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.traces.RegionSubject +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder +import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters import org.junit.runners.Parameterized @@ -78,6 +82,15 @@ class MovePipUpShelfHeightChangeTest( current.isLowerOrEqual(previous.region) } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + companion object { /** * Creates the test configurations. diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipKeyboardTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipKeyboardTest.kt index 45cbdc8fb1fc8..81ac10fa90787 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipKeyboardTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipKeyboardTest.kt @@ -25,9 +25,11 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group4 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.helpers.WindowUtils +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.traces.common.FlickerComponentName import com.android.wm.shell.flicker.helpers.ImeAppHelper +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -70,6 +72,15 @@ class PipKeyboardTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + /** * Ensure the pip window remains visible throughout any keyboard interactions */ diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipLegacySplitScreenTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipLegacySplitScreenTest.kt index 3e3ea167bd42c..70075dda56ed7 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipLegacySplitScreenTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipLegacySplitScreenTest.kt @@ -89,6 +89,15 @@ class PipLegacySplitScreenTest(testSpec: FlickerTestParameter) : PipTransition(t } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(com.android.server.wm.flicker.helpers.isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + @FlakyTest(bugId = 161435597) @Test fun pipWindowInsideDisplayBounds() { diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipRotationTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipRotationTest.kt index af984b3cb1010..16fc0489fbc80 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipRotationTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/PipRotationTest.kt @@ -27,10 +27,13 @@ import com.android.server.wm.flicker.annotation.Group4 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.entireScreenCovered import com.android.server.wm.flicker.helpers.WindowUtils +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.wm.shell.flicker.helpers.FixedAppHelper +import org.junit.Assume.assumeFalse +import org.junit.Before import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -81,6 +84,12 @@ class PipRotationTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) } } + @Before + fun onBefore() { + // This CUJ don't work in shell transitions because of b/204570898 b/204562589 b/206753786 + assumeFalse(isShellTransitionsEnabled) + } + /** * Checks that all parts of the screen are covered at the start and end of the transition */ diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt index f8e2d3871514b..9c261051896a2 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt @@ -25,10 +25,12 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group4 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.helpers.WindowUtils +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE import com.android.wm.shell.flicker.testapp.Components.FixedActivity.EXTRA_FIXED_ORIENTATION import com.android.wm.shell.flicker.testapp.Components.PipActivity.EXTRA_ENTER_PIP import org.junit.Assert.assertEquals +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -102,7 +104,11 @@ class SetRequestedOrientationWhilePinnedTest( @FlakyTest @Test - override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } @FlakyTest @Test diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/tv/TvPipTestBase.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/tv/TvPipTestBase.kt index 31e9167c79b24..9c3b0fa183b68 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/tv/TvPipTestBase.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/tv/TvPipTestBase.kt @@ -27,7 +27,7 @@ import com.android.wm.shell.flicker.SYSTEM_UI_PACKAGE_NAME import com.android.wm.shell.flicker.pip.PipTestBase import org.junit.After import org.junit.Assert.assertFalse -import org.junit.Assume +import org.junit.Assume.assumeTrue import org.junit.Before abstract class TvPipTestBase : PipTestBase(rotationToString(ROTATION_0), ROTATION_0) { @@ -37,7 +37,7 @@ abstract class TvPipTestBase : PipTestBase(rotationToString(ROTATION_0), ROTATIO @Before final override fun televisionSetUp() { // Should run only on TVs. - Assume.assumeTrue(isTelevision) + assumeTrue(isTelevision) systemUiProcessObserver.start() diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppBackButtonTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppBackButtonTest.kt index 209d1aaaabde8..7076a07c8ef67 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppBackButtonTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppBackButtonTest.kt @@ -17,6 +17,7 @@ package com.android.server.wm.flicker.close +import android.platform.test.annotations.Presubmit import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -24,6 +25,8 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group4 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -79,6 +82,33 @@ class CloseAppBackButtonTest(testSpec: FlickerTestParameter) : CloseAppTransitio @Test override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales() + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun launcherLayerReplacesApp() { + // This test doesn't work in shell transitions because of b/206086894 + assumeFalse(isShellTransitionsEnabled) + super.launcherLayerReplacesApp() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun entireScreenCovered() { + // This test doesn't work in shell transitions because of b/206086894 + assumeFalse(isShellTransitionsEnabled) + super.entireScreenCovered() + } + companion object { /** * Creates the test configurations. diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppHomeButtonTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppHomeButtonTest.kt index ac557cf7a4d3f..b5d01ef24f237 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppHomeButtonTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppHomeButtonTest.kt @@ -16,6 +16,7 @@ package com.android.server.wm.flicker.close +import android.platform.test.annotations.Presubmit import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerParametersRunnerFactory @@ -23,6 +24,8 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group4 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -78,6 +81,33 @@ class CloseAppHomeButtonTest(testSpec: FlickerTestParameter) : CloseAppTransitio @Test override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales() + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun launcherLayerReplacesApp() { + // This test doesn't work in shell transitions because of b/206086894 + assumeFalse(isShellTransitionsEnabled) + super.launcherLayerReplacesApp() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun entireScreenCovered() { + // This test doesn't work in shell transitions because of b/206086894 + assumeFalse(isShellTransitionsEnabled) + super.entireScreenCovered() + } + companion object { /** * Creates the test configurations. diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt index c7dfbf82eac1f..f12e4aeea4bee 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToAppTest.kt @@ -30,6 +30,7 @@ import com.android.server.wm.flicker.annotation.Group2 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.entireScreenCovered import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.navBarLayerIsVisible import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsVisible @@ -37,6 +38,7 @@ import com.android.server.wm.flicker.statusBarLayerIsVisible import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.server.wm.traces.common.FlickerComponentName +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -154,7 +156,11 @@ class CloseImeAutoOpenWindowToAppTest(private val testSpec: FlickerTestParameter @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt index 5315da1d06167..b1bdb31670994 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeAutoOpenWindowToHomeTest.kt @@ -34,10 +34,12 @@ import com.android.server.wm.flicker.navBarLayerIsVisible import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsVisible import com.android.server.wm.flicker.entireScreenCovered +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.statusBarLayerIsVisible import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.server.wm.traces.common.FlickerComponentName +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -115,7 +117,11 @@ class CloseImeAutoOpenWindowToHomeTest(private val testSpec: FlickerTestParamete @Presubmit @Test - fun entireScreenCovered() = testSpec.entireScreenCovered() + fun entireScreenCovered() { + // This test doesn't work in shell transitions because of b/206086894 + assumeFalse(isShellTransitionsEnabled) + testSpec.entireScreenCovered() + } @Presubmit @Test @@ -153,7 +159,11 @@ class CloseImeAutoOpenWindowToHomeTest(private val testSpec: FlickerTestParamete @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt index d063b6922ab34..d975cf40657b6 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToAppTest.kt @@ -32,10 +32,12 @@ import com.android.server.wm.flicker.navBarLayerIsVisible import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsVisible import com.android.server.wm.flicker.entireScreenCovered +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.server.wm.traces.common.FlickerComponentName -import org.junit.Assume +import org.junit.Assume.assumeFalse +import org.junit.Assume.assumeTrue import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -119,20 +121,24 @@ class CloseImeWindowToAppTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test fun navBarLayerRotatesAndScales() { - Assume.assumeFalse(testSpec.isLandscapeOrSeascapeAtStart) + assumeFalse(testSpec.isLandscapeOrSeascapeAtStart) testSpec.navBarLayerRotatesAndScales() } @FlakyTest @Test fun navBarLayerRotatesAndScales_Flaky() { - Assume.assumeTrue(testSpec.isLandscapeOrSeascapeAtStart) + assumeTrue(testSpec.isLandscapeOrSeascapeAtStart) testSpec.navBarLayerRotatesAndScales() } @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt index b589969dee140..ac907525ac13a 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/CloseImeWindowToHomeTest.kt @@ -34,9 +34,11 @@ import com.android.server.wm.flicker.navBarLayerIsVisible import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsVisible import com.android.server.wm.flicker.entireScreenCovered +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.server.wm.traces.common.FlickerComponentName +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -124,7 +126,11 @@ class CloseImeWindowToHomeTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test - fun entireScreenCovered() = testSpec.entireScreenCovered() + fun entireScreenCovered() { + // This test doesn't work in shell transitions because of b/206086894 + assumeFalse(isShellTransitionsEnabled) + testSpec.entireScreenCovered() + } @Presubmit @Test @@ -146,7 +152,11 @@ class CloseImeWindowToHomeTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowTest.kt index 7bf0186cd857e..cc5d9d2b20b59 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/OpenImeWindowTest.kt @@ -34,9 +34,11 @@ import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsVisible import com.android.server.wm.flicker.entireScreenCovered import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.statusBarLayerIsVisible import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.flicker.statusBarWindowIsVisible +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -128,7 +130,11 @@ class OpenImeWindowTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ReOpenImeWindowTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ReOpenImeWindowTest.kt index 5d8a382d8c926..84e78ec40b29e 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ReOpenImeWindowTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/ime/ReOpenImeWindowTest.kt @@ -17,10 +17,10 @@ package com.android.server.wm.flicker.ime import android.app.Instrumentation -import android.os.SystemProperties import android.platform.test.annotations.Presubmit import android.view.Surface import android.view.WindowManagerPolicyConstants +import androidx.test.filters.FlakyTest import androidx.test.filters.RequiresDevice import androidx.test.platform.app.InstrumentationRegistry import com.android.server.wm.flicker.FlickerBuilderProvider @@ -37,11 +37,13 @@ import com.android.server.wm.flicker.navBarLayerRotatesAndScales import com.android.server.wm.flicker.navBarWindowIsVisible import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.entireScreenCovered +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.statusBarLayerIsVisible import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.server.wm.traces.common.FlickerComponentName -import org.junit.Assume +import org.junit.Assume.assumeFalse +import org.junit.Assume.assumeTrue import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -60,8 +62,6 @@ import org.junit.runners.Parameterized class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { private val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation() private val testApp = ImeAppAutoFocusHelper(instrumentation, testSpec.startRotation) - private val isShellTransitionsEnabled = - SystemProperties.getBoolean("persist.debug.shell_transit", false) @FlickerBuilderProvider fun buildFlicker(): FlickerBuilder { @@ -101,6 +101,8 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test fun visibleWindowsShownMoreThanOneConsecutiveEntry() { + // This test doesn't work in shell transitions because of b/204570898 + assumeFalse(isShellTransitionsEnabled) val component = FlickerComponentName("", "RecentTaskScreenshotSurface") testSpec.assertWm { this.visibleWindowsShownMoreThanOneConsecutiveEntry( @@ -114,6 +116,8 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test fun launcherWindowBecomesInvisible() { + // This test doesn't work in shell transitions because of b/204574221 + assumeFalse(isShellTransitionsEnabled) testSpec.assertWm { this.isAppWindowVisible(LAUNCHER_COMPONENT) .then() @@ -123,12 +127,16 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test - fun imeWindowIsAlwaysVisible() = testSpec.imeWindowIsAlwaysVisible(!isShellTransitionsEnabled) + fun imeWindowIsAlwaysVisible() { + // This test doesn't work in shell transitions because of b/204570898 + assumeFalse(isShellTransitionsEnabled) + testSpec.imeWindowIsAlwaysVisible(!isShellTransitionsEnabled) + } @Presubmit @Test fun imeAppWindowVisibilityLegacy() { - Assume.assumeFalse(isShellTransitionsEnabled) + assumeFalse(isShellTransitionsEnabled) // the app starts visible in live tile, and stays visible for the duration of entering // and exiting overview. However, legacy transitions seem to have a bug which causes // everything to restart during the test, so expect the app to disappear and come back. @@ -143,10 +151,10 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { } } - @Presubmit + @FlakyTest(bugId = 204570898) @Test fun imeAppWindowVisibility() { - Assume.assumeTrue(isShellTransitionsEnabled) + assumeTrue(isShellTransitionsEnabled) // the app starts visible in live tile, and stays visible for the duration of entering // and exiting overview. Since we log 1x per frame, sometimes the activity visibility // and the app visibility are updated together, sometimes not, thus ignore activity @@ -172,7 +180,7 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test fun imeLayerIsBecomesVisibleLegacy() { - Assume.assumeFalse(isShellTransitionsEnabled) + assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isVisible(FlickerComponentName.IME) .then() @@ -182,10 +190,10 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { } } - @Presubmit + @FlakyTest(bugId = 204570898) @Test fun imeLayerIsBecomesVisible() { - Assume.assumeTrue(isShellTransitionsEnabled) + assumeTrue(isShellTransitionsEnabled) testSpec.assertLayers { this.isVisible(FlickerComponentName.IME) } @@ -194,6 +202,8 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test fun appLayerReplacesLauncher() { + // This test doesn't work in shell transitions because of b/204574221 + assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isVisible(LAUNCHER_COMPONENT) .then() @@ -209,7 +219,11 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) { @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } @Presubmit @Test diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt index c4fec7fb5142e..fe434268fbc96 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppColdTest.kt @@ -25,7 +25,9 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.rules.RemoveAllTasksButHomeRule.Companion.removeAllTasksButHome +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -78,6 +80,15 @@ class OpenAppColdTest(testSpec: FlickerTestParameter) : OpenAppTransition(testSp } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + /** {@inheritDoc} */ @FlakyTest @Test diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt index c572e8b066c13..53b53547707a0 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromOverviewTest.kt @@ -28,7 +28,9 @@ import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.helpers.reopenAppFromOverview import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.traces.common.WindowManagerConditionsFactory +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -96,14 +98,54 @@ class OpenAppFromOverviewTest(testSpec: FlickerTestParameter) : OpenAppTransitio } /** {@inheritDoc} */ - @FlakyTest + @Presubmit @Test - override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } /** {@inheritDoc} */ @Presubmit @Test - override fun appLayerReplacesLauncher() = super.appLayerReplacesLauncher() + override fun entireScreenCovered() { + // This test doesn't work in shell transitions because of b/204570898 + assumeFalse(isShellTransitionsEnabled) + super.entireScreenCovered() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun appWindowReplacesLauncherAsTopWindow() { + // This test doesn't work in shell transitions because of b/206085788 + assumeFalse(isShellTransitionsEnabled) + super.appWindowReplacesLauncherAsTopWindow() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun appLayerReplacesLauncher() { + // This test doesn't work in shell transitions because of b/206085788 + assumeFalse(isShellTransitionsEnabled) + super.appLayerReplacesLauncher() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun visibleLayersShownMoreThanOneConsecutiveEntry() { + // This test doesn't work in shell transitions because of b/206090480 + assumeFalse(isShellTransitionsEnabled) + super.visibleLayersShownMoreThanOneConsecutiveEntry() + } + + /** {@inheritDoc} */ + @FlakyTest + @Test + override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales() /** {@inheritDoc} */ @Presubmit 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 bd9d7d7cccc05..429841bf47362 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 @@ -28,9 +28,11 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.helpers.NonResizeableAppHelper import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.WindowUtils import com.android.server.wm.traces.common.FlickerComponentName import com.google.common.truth.Truth +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -188,15 +190,21 @@ class OpenAppNonResizeableTest(testSpec: FlickerTestParameter) : OpenAppTransiti /** {@inheritDoc} */ @FlakyTest(bugId = 202936526) @Test - override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } /** {@inheritDoc} */ @Presubmit @Test fun statusBarLayerPositionAtEnd() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) testSpec.assertLayersEnd { val display = this.entry.displays.minByOrNull { it.id } - ?: throw RuntimeException("There is no display!") + ?: error("There is no display!") this.visibleRegion(FlickerComponentName.STATUS_BAR) .coversExactly(WindowUtils.getStatusBarPosition(display)) } diff --git a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt index dc7df34c0e9c7..4db01bf53833c 100644 --- a/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt +++ b/tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppWarmTest.kt @@ -25,6 +25,8 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group1 import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -82,6 +84,33 @@ class OpenAppWarmTest(testSpec: FlickerTestParameter) : OpenAppTransition(testSp } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + super.statusBarLayerRotatesScales() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun appWindowReplacesLauncherAsTopWindow() { + // This test doesn't work in shell transitions because of b/206094140 + assumeFalse(isShellTransitionsEnabled) + super.appWindowReplacesLauncherAsTopWindow() + } + + /** {@inheritDoc} */ + @Presubmit + @Test + override fun visibleLayersShownMoreThanOneConsecutiveEntry() { + // This test doesn't work in shell transitions because of b/206094140 + assumeFalse(isShellTransitionsEnabled) + super.visibleLayersShownMoreThanOneConsecutiveEntry() + } + /** {@inheritDoc} */ @FlakyTest @Test 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 4a904044cd743..a97a48eb6b199 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 @@ -26,11 +26,13 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.helpers.SimpleAppHelper +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.rules.WMFlickerServiceRuleForTestSpec import com.android.server.wm.flicker.statusBarLayerIsVisible import com.android.server.wm.flicker.statusBarLayerRotatesScales import com.android.server.wm.flicker.statusBarWindowIsVisible import com.android.server.wm.traces.common.FlickerComponentName +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Rule import org.junit.Test @@ -161,7 +163,11 @@ class ChangeAppRotationTest( */ @Presubmit @Test - fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() + fun statusBarLayerRotatesScales() { + // This test doesn't work in shell transitions because of b/206753786 + assumeFalse(isShellTransitionsEnabled) + testSpec.statusBarLayerRotatesScales() + } /** {@inheritDoc} */ @FlakyTest 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 c55d7af8f2162..3ca60e3233cd7 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 @@ -26,8 +26,10 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group3 import com.android.server.wm.flicker.dsl.FlickerBuilder import com.android.server.wm.flicker.helpers.SeamlessRotationAppHelper +import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.testapp.ActivityOptions import com.android.server.wm.traces.common.FlickerComponentName +import org.junit.Assume.assumeFalse import org.junit.FixMethodOrder import org.junit.Test import org.junit.runner.RunWith @@ -100,6 +102,8 @@ class SeamlessAppRotationTest( @Presubmit @Test fun appWindowFullScreen() { + // This test doesn't work in shell transitions because of b/206101151 + assumeFalse(isShellTransitionsEnabled) testSpec.assertWm { this.invoke("isFullScreen") { val appWindow = it.windowState(testApp.`package`) @@ -135,17 +139,30 @@ class SeamlessAppRotationTest( @Presubmit @Test fun appLayerAlwaysVisible() { + // This test doesn't work in shell transitions because of b/206101151 + assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { isVisible(testApp.component) } } + /** {@inheritDoc} */ + @Presubmit + @Test + override fun focusDoesNotChange() { + // This test doesn't work in shell transitions because of b/206101151 + assumeFalse(isShellTransitionsEnabled) + super.focusDoesNotChange() + } + /** * Checks that [testApp] layer covers the entire screen during the whole transition */ @Presubmit @Test fun appLayerRotates() { + // This test doesn't work in shell transitions because of b/206101151 + assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.invoke("entireScreenCovered") { entry -> entry.entry.displays.map { display ->