From 4faf378213359d408ba9c021e5b024335423fb6f Mon Sep 17 00:00:00 2001 From: Pablo Gamito Date: Tue, 13 Dec 2022 16:56:03 +0000 Subject: [PATCH] Run tablet specific assertions only on tablets To avoid assumption failures Fixes: 262390300 Test: atest FlickerTests:SeamlessAppRotationTest Change-Id: Ie02ef527640f1e0637297deefe7a743a5e126d5c --- .../server/wm/flicker/ime/CloseImeWindowToAppTest.kt | 4 +++- .../wm/flicker/ime/CloseImeWindowToHomeTest.kt | 4 +++- .../wm/flicker/rotation/SeamlessAppRotationTest.kt | 12 ++++++++---- 3 files changed, 14 insertions(+), 6 deletions(-) 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 afc5f650cb531..ca4c6a39687f6 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 @@ -106,7 +106,9 @@ class CloseImeWindowToAppTest(flicker: FlickerTest) : BaseTest(flicker) { @IwTest(focusArea = "ime") override fun cujCompleted() { super.cujCompleted() - navBarLayerPositionAtStartAndEnd() + if (!flicker.scenario.isTablet) { + navBarLayerPositionAtStartAndEnd() + } imeLayerBecomesInvisible() imeAppLayerIsAlwaysVisible() imeAppWindowIsAlwaysVisible() 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 aedf965137b00..730c4f5e8d271 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 @@ -104,7 +104,9 @@ class CloseImeWindowToHomeTest(flicker: FlickerTest) : BaseTest(flicker) { @IwTest(focusArea = "ime") override fun cujCompleted() { super.cujCompleted() - navBarLayerPositionAtStartAndEnd() + if (!flicker.scenario.isTablet) { + navBarLayerPositionAtStartAndEnd() + } imeLayerBecomesInvisible() imeAppWindowBecomesInvisible() imeWindowBecomesInvisible() 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 54f38c32f4451..2447474a4a9d5 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 @@ -213,6 +213,14 @@ open class SeamlessAppRotationTest(flicker: FlickerTest) : RotationTransition(fl // not yet tablet compatible appLayerRotates() appLayerAlwaysVisible() + // not tablet compatible + navBarLayerIsVisibleAtStartAndEnd() + navBarWindowIsAlwaysVisible() + } + + if (flicker.scenario.isTablet) { + taskBarLayerIsVisibleAtStartAndEnd() + taskBarWindowIsAlwaysVisible() } appWindowFullScreen() @@ -223,10 +231,6 @@ open class SeamlessAppRotationTest(flicker: FlickerTest) : RotationTransition(fl appLayerRotates_StartingPos() appLayerRotates_EndingPos() entireScreenCovered() - navBarLayerIsVisibleAtStartAndEnd() - navBarWindowIsAlwaysVisible() - taskBarLayerIsVisibleAtStartAndEnd() - taskBarWindowIsAlwaysVisible() visibleLayersShownMoreThanOneConsecutiveEntry() visibleWindowsShownMoreThanOneConsecutiveEntry() }