Loading tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt +4 −2 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ abstract class BaseTest @JvmOverloads constructor( } /** * Checks that the [ComponentMatcher.TASK_BAR] layer is visible during the whole transition * Checks that the [ComponentMatcher.TASK_BAR] window is visible at the start and end of the * transition * * Note: Large screen only */ Loading @@ -132,7 +133,8 @@ abstract class BaseTest @JvmOverloads constructor( } /** * Checks that the [ComponentMatcher.STATUS_BAR] layer is visible during the whole transition * Checks that the [ComponentMatcher.STATUS_BAR] layer is visible at the start and end * of the transition */ @Presubmit @Test Loading tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +26 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,16 @@ fun FlickerTestParameter.taskBarWindowIsAlwaysVisible() { } } /** * Checks that [ComponentMatcher.TASK_BAR] window is visible and above the app windows in * all WM trace entries */ fun FlickerTestParameter.taskBarWindowIsVisibleAtEnd() { assertWmEnd { this.isAboveAppWindowVisible(ComponentMatcher.TASK_BAR) } } /** * If [allStates] is true, checks if the stack space of all displays is fully covered * by any visible layer, during the whole transitions Loading Loading @@ -103,9 +113,25 @@ fun FlickerTestParameter.navBarLayerIsVisibleAtStartAndEnd() { * trace */ fun FlickerTestParameter.taskBarLayerIsVisibleAtStartAndEnd() { this.taskBarLayerIsVisibleAtStart() this.taskBarLayerIsVisibleAtEnd() } /** * Checks that [ComponentMatcher.TASK_BAR] layer is visible at the start of the SF * trace */ fun FlickerTestParameter.taskBarLayerIsVisibleAtStart() { assertLayersStart { this.isVisible(ComponentMatcher.TASK_BAR) } } /** * Checks that [ComponentMatcher.TASK_BAR] layer is visible at the end of the SF * trace */ fun FlickerTestParameter.taskBarLayerIsVisibleAtEnd() { assertLayersEnd { this.isVisible(ComponentMatcher.TASK_BAR) } Loading tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromNotificationWarm.kt +40 −0 Original line number Diff line number Diff line Loading @@ -32,8 +32,12 @@ import com.android.server.wm.flicker.helpers.NotificationAppHelper import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.taskBarLayerIsVisibleAtEnd import com.android.server.wm.flicker.taskBarWindowIsVisibleAtEnd import com.android.server.wm.traces.common.ComponentMatcher import org.junit.Assume import org.junit.FixMethodOrder import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters Loading Loading @@ -231,6 +235,42 @@ open class OpenAppFromNotificationWarm( super.appWindowBecomesTopWindow() } /** * Checks that the [ComponentMatcher.TASK_BAR] window is visible at the end of the transition * * Note: Large screen only */ @Postsubmit @Test open fun taskBarWindowIsVisibleAtEnd() { Assume.assumeFalse(testSpec.isTablet) testSpec.taskBarWindowIsVisibleAtEnd() } /** * Checks that the [ComponentMatcher.TASK_BAR] layer is visible at the end of the transition * * Note: Large screen only */ @Postsubmit @Test open fun taskBarLayerIsVisibleAtEnd() { Assume.assumeFalse(testSpec.isTablet) testSpec.taskBarLayerIsVisibleAtEnd() } /** {@inheritDoc} */ @Test @Ignore("Display is locked at the start") override fun taskBarWindowIsAlwaysVisible() = super.taskBarWindowIsAlwaysVisible() /** {@inheritDoc} */ @Test @Ignore("Display is locked at the start") override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd() companion object { /** * Creates the test configurations. Loading Loading
tests/FlickerTests/src/com/android/server/wm/flicker/BaseTest.kt +4 −2 Original line number Diff line number Diff line Loading @@ -108,7 +108,8 @@ abstract class BaseTest @JvmOverloads constructor( } /** * Checks that the [ComponentMatcher.TASK_BAR] layer is visible during the whole transition * Checks that the [ComponentMatcher.TASK_BAR] window is visible at the start and end of the * transition * * Note: Large screen only */ Loading @@ -132,7 +133,8 @@ abstract class BaseTest @JvmOverloads constructor( } /** * Checks that the [ComponentMatcher.STATUS_BAR] layer is visible during the whole transition * Checks that the [ComponentMatcher.STATUS_BAR] layer is visible at the start and end * of the transition */ @Presubmit @Test Loading
tests/FlickerTests/src/com/android/server/wm/flicker/CommonAssertions.kt +26 −0 Original line number Diff line number Diff line Loading @@ -52,6 +52,16 @@ fun FlickerTestParameter.taskBarWindowIsAlwaysVisible() { } } /** * Checks that [ComponentMatcher.TASK_BAR] window is visible and above the app windows in * all WM trace entries */ fun FlickerTestParameter.taskBarWindowIsVisibleAtEnd() { assertWmEnd { this.isAboveAppWindowVisible(ComponentMatcher.TASK_BAR) } } /** * If [allStates] is true, checks if the stack space of all displays is fully covered * by any visible layer, during the whole transitions Loading Loading @@ -103,9 +113,25 @@ fun FlickerTestParameter.navBarLayerIsVisibleAtStartAndEnd() { * trace */ fun FlickerTestParameter.taskBarLayerIsVisibleAtStartAndEnd() { this.taskBarLayerIsVisibleAtStart() this.taskBarLayerIsVisibleAtEnd() } /** * Checks that [ComponentMatcher.TASK_BAR] layer is visible at the start of the SF * trace */ fun FlickerTestParameter.taskBarLayerIsVisibleAtStart() { assertLayersStart { this.isVisible(ComponentMatcher.TASK_BAR) } } /** * Checks that [ComponentMatcher.TASK_BAR] layer is visible at the end of the SF * trace */ fun FlickerTestParameter.taskBarLayerIsVisibleAtEnd() { assertLayersEnd { this.isVisible(ComponentMatcher.TASK_BAR) } Loading
tests/FlickerTests/src/com/android/server/wm/flicker/launch/OpenAppFromNotificationWarm.kt +40 −0 Original line number Diff line number Diff line Loading @@ -32,8 +32,12 @@ import com.android.server.wm.flicker.helpers.NotificationAppHelper import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.taskBarLayerIsVisibleAtEnd import com.android.server.wm.flicker.taskBarWindowIsVisibleAtEnd import com.android.server.wm.traces.common.ComponentMatcher import org.junit.Assume import org.junit.FixMethodOrder import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters Loading Loading @@ -231,6 +235,42 @@ open class OpenAppFromNotificationWarm( super.appWindowBecomesTopWindow() } /** * Checks that the [ComponentMatcher.TASK_BAR] window is visible at the end of the transition * * Note: Large screen only */ @Postsubmit @Test open fun taskBarWindowIsVisibleAtEnd() { Assume.assumeFalse(testSpec.isTablet) testSpec.taskBarWindowIsVisibleAtEnd() } /** * Checks that the [ComponentMatcher.TASK_BAR] layer is visible at the end of the transition * * Note: Large screen only */ @Postsubmit @Test open fun taskBarLayerIsVisibleAtEnd() { Assume.assumeFalse(testSpec.isTablet) testSpec.taskBarLayerIsVisibleAtEnd() } /** {@inheritDoc} */ @Test @Ignore("Display is locked at the start") override fun taskBarWindowIsAlwaysVisible() = super.taskBarWindowIsAlwaysVisible() /** {@inheritDoc} */ @Test @Ignore("Display is locked at the start") override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd() companion object { /** * Creates the test configurations. Loading