Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +22 −20 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ package com.android.wm.shell.flicker import android.view.Surface import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.helpers.WindowUtils import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.traces.layers.LayerTraceEntrySubject import com.android.server.wm.flicker.traces.layers.LayersTraceSubject import com.android.server.wm.traces.common.IComponentMatcher Loading Loading @@ -99,15 +100,9 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisible( portraitPosTop: Boolean ) { assertLayers { // TODO(b/242025948): Use SPLIT_SCREEN_DIVIDER_COMPONENT.or(component) for notContains // and isInvisible when they are ready. this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT) this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .notContains(component, isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .then() .isInvisible(component, isOptional = true) .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .splitAppLayerBoundsSnapToDivider( component, landscapePosLeft, portraitPosTop, endRotation) Loading @@ -118,20 +113,27 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisibleByDrag( component: IComponentMatcher ) { assertLayers { // TODO(b/242025948): Use SPLIT_SCREEN_DIVIDER_COMPONENT.or(component) for notContains // and isInvisible when they are ready. this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT) if (isShellTransitionsEnabled) { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .notContains(component, isOptional = true) .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } else { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) .then() .isInvisible(component, isOptional = true) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } } } fun FlickerTestParameter.splitAppLayerBoundsBecomesInvisible( component: IComponentMatcher, Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromAllApps.kt +20 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,26 @@ class EnterSplitScreenByDragFromAllApps( @Presubmit @Test fun secondaryAppLayerBecomesVisible() = testSpec.layerBecomesVisible(secondaryApp) fun secondaryAppLayerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isInvisible(secondaryApp) .then() .isVisible(secondaryApp) .then() .isInvisible(secondaryApp) .then() .isVisible(secondaryApp) } } // TODO(b/245472831): Align to legacy transition after shell transition ready. @Presubmit @Test fun secondaryAppLayerBecomesVisible_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.layerBecomesVisible(secondaryApp) } @Presubmit @Test Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromNotification.kt +19 −1 Original line number Diff line number Diff line Loading @@ -116,8 +116,26 @@ class EnterSplitScreenByDragFromNotification( @Presubmit @Test fun secondaryAppLayerBecomesVisible() = fun secondaryAppLayerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isInvisible(sendNotificationApp) .then() .isVisible(sendNotificationApp) .then() .isInvisible(sendNotificationApp) .then() .isVisible(sendNotificationApp) } } // TODO(b/245472831): Align to legacy transition after shell transition ready. @Presubmit @Test fun secondaryAppLayerBecomesVisible_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.layerBecomesVisible(sendNotificationApp) } @Presubmit @Test Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromTaskbar.kt +20 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,26 @@ class EnterSplitScreenByDragFromTaskbar( @Presubmit @Test fun secondaryAppLayerBecomesVisible() = testSpec.layerBecomesVisible(secondaryApp) fun secondaryAppLayerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isInvisible(secondaryApp) .then() .isVisible(secondaryApp) .then() .isInvisible(secondaryApp) .then() .isVisible(secondaryApp) } } // TODO(b/245472831): Align to legacy transition after shell transition ready. @Presubmit @Test fun secondaryAppLayerBecomesVisible_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.layerBecomesVisible(secondaryApp) } @Presubmit @Test Loading Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +22 −20 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ package com.android.wm.shell.flicker import android.view.Surface import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.helpers.WindowUtils import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled import com.android.server.wm.flicker.traces.layers.LayerTraceEntrySubject import com.android.server.wm.flicker.traces.layers.LayersTraceSubject import com.android.server.wm.traces.common.IComponentMatcher Loading Loading @@ -99,15 +100,9 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisible( portraitPosTop: Boolean ) { assertLayers { // TODO(b/242025948): Use SPLIT_SCREEN_DIVIDER_COMPONENT.or(component) for notContains // and isInvisible when they are ready. this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT) this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .notContains(component, isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .then() .isInvisible(component, isOptional = true) .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .splitAppLayerBoundsSnapToDivider( component, landscapePosLeft, portraitPosTop, endRotation) Loading @@ -118,20 +113,27 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisibleByDrag( component: IComponentMatcher ) { assertLayers { // TODO(b/242025948): Use SPLIT_SCREEN_DIVIDER_COMPONENT.or(component) for notContains // and isInvisible when they are ready. this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT) if (isShellTransitionsEnabled) { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .notContains(component, isOptional = true) .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } else { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) .then() .isInvisible(component, isOptional = true) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } } } fun FlickerTestParameter.splitAppLayerBoundsBecomesInvisible( component: IComponentMatcher, Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromAllApps.kt +20 −1 Original line number Diff line number Diff line Loading @@ -104,7 +104,26 @@ class EnterSplitScreenByDragFromAllApps( @Presubmit @Test fun secondaryAppLayerBecomesVisible() = testSpec.layerBecomesVisible(secondaryApp) fun secondaryAppLayerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isInvisible(secondaryApp) .then() .isVisible(secondaryApp) .then() .isInvisible(secondaryApp) .then() .isVisible(secondaryApp) } } // TODO(b/245472831): Align to legacy transition after shell transition ready. @Presubmit @Test fun secondaryAppLayerBecomesVisible_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.layerBecomesVisible(secondaryApp) } @Presubmit @Test Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromNotification.kt +19 −1 Original line number Diff line number Diff line Loading @@ -116,8 +116,26 @@ class EnterSplitScreenByDragFromNotification( @Presubmit @Test fun secondaryAppLayerBecomesVisible() = fun secondaryAppLayerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isInvisible(sendNotificationApp) .then() .isVisible(sendNotificationApp) .then() .isInvisible(sendNotificationApp) .then() .isVisible(sendNotificationApp) } } // TODO(b/245472831): Align to legacy transition after shell transition ready. @Presubmit @Test fun secondaryAppLayerBecomesVisible_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.layerBecomesVisible(sendNotificationApp) } @Presubmit @Test Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromTaskbar.kt +20 −1 Original line number Diff line number Diff line Loading @@ -107,7 +107,26 @@ class EnterSplitScreenByDragFromTaskbar( @Presubmit @Test fun secondaryAppLayerBecomesVisible() = testSpec.layerBecomesVisible(secondaryApp) fun secondaryAppLayerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.assertLayers { this.isInvisible(secondaryApp) .then() .isVisible(secondaryApp) .then() .isInvisible(secondaryApp) .then() .isVisible(secondaryApp) } } // TODO(b/245472831): Align to legacy transition after shell transition ready. @Presubmit @Test fun secondaryAppLayerBecomesVisible_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.layerBecomesVisible(secondaryApp) } @Presubmit @Test Loading