Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +27 −2 Original line number Diff line number Diff line Loading @@ -99,15 +99,40 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisible( portraitPosTop: Boolean ) { assertLayers { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component), isOptional = true) // TODO(b/242025948): Use SPLIT_SCREEN_DIVIDER_COMPONENT.or(component) for notContains // and isInvisible when they are ready. this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .notContains(component, isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .then() .isInvisible(component, isOptional = true) .then() .splitAppLayerBoundsSnapToDivider( component, landscapePosLeft, portraitPosTop, endRotation) } } 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) .then() .notContains(component, isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .then() .isInvisible(component, isOptional = true) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } } fun FlickerTestParameter.splitAppLayerBoundsBecomesInvisible( component: IComponentMatcher, landscapePosLeft: Boolean, Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromAllApps.kt +19 −4 Original line number Diff line number Diff line Loading @@ -26,12 +26,14 @@ 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.SPLIT_SCREEN_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appWindowBecomesVisible import com.android.wm.shell.flicker.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper import com.android.wm.shell.flicker.layerBecomesVisible import com.android.wm.shell.flicker.layerIsVisibleAtEnd import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisible import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisibleByDrag import com.android.wm.shell.flicker.splitAppLayerBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.splitScreenDividerBecomesVisible import org.junit.Assume Loading Loading @@ -83,7 +85,20 @@ class EnterSplitScreenByDragFromAllApps( @Presubmit @Test fun splitScreenDividerBecomesVisible() = testSpec.splitScreenDividerBecomesVisible() fun splitScreenDividerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.splitScreenDividerBecomesVisible() } // TODO(b/245472831): Back to splitScreenDividerBecomesVisible after shell transition ready. @Presubmit @Test fun splitScreenDividerIsVisibleAtEnd_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.assertLayersEnd { this.isVisible(SPLIT_SCREEN_DIVIDER_COMPONENT) } } @Presubmit @Test Loading @@ -100,8 +115,8 @@ class EnterSplitScreenByDragFromAllApps( @Presubmit @Test fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisible( secondaryApp, landscapePosLeft = true, portraitPosTop = true) fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisibleByDrag( secondaryApp) @Presubmit @Test Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromNotification.kt +19 −4 Original line number Diff line number Diff line Loading @@ -28,11 +28,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.SPLIT_SCREEN_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper import com.android.wm.shell.flicker.layerBecomesVisible import com.android.wm.shell.flicker.layerIsVisibleAtEnd import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisible import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisibleByDrag import com.android.wm.shell.flicker.splitAppLayerBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.splitScreenDividerBecomesVisible import org.junit.Assume Loading Loading @@ -97,7 +99,20 @@ class EnterSplitScreenByDragFromNotification( @Presubmit @Test fun splitScreenDividerBecomesVisible() = testSpec.splitScreenDividerBecomesVisible() fun splitScreenDividerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.splitScreenDividerBecomesVisible() } // TODO(b/245472831): Back to splitScreenDividerBecomesVisible after shell transition ready. @Presubmit @Test fun splitScreenDividerIsVisibleAtEnd_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.assertLayersEnd { this.isVisible(SPLIT_SCREEN_DIVIDER_COMPONENT) } } @Presubmit @Test Loading @@ -115,8 +130,8 @@ class EnterSplitScreenByDragFromNotification( @Presubmit @Test fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisible( sendNotificationApp, landscapePosLeft = true, portraitPosTop = true) fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisibleByDrag( sendNotificationApp) @Presubmit @Test Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromTaskbar.kt +19 −4 Original line number Diff line number Diff line Loading @@ -26,12 +26,14 @@ 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.SPLIT_SCREEN_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appWindowBecomesVisible import com.android.wm.shell.flicker.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper import com.android.wm.shell.flicker.layerBecomesVisible import com.android.wm.shell.flicker.layerIsVisibleAtEnd import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisible import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisibleByDrag import com.android.wm.shell.flicker.splitAppLayerBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.splitScreenDividerBecomesVisible import org.junit.Assume Loading Loading @@ -86,7 +88,20 @@ class EnterSplitScreenByDragFromTaskbar( @Presubmit @Test fun splitScreenDividerBecomesVisible() = testSpec.splitScreenDividerBecomesVisible() fun splitScreenDividerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.splitScreenDividerBecomesVisible() } // TODO(b/245472831): Back to splitScreenDividerBecomesVisible after shell transition ready. @Presubmit @Test fun splitScreenDividerIsVisibleAtEnd_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.assertLayersEnd { this.isVisible(SPLIT_SCREEN_DIVIDER_COMPONENT) } } @Presubmit @Test Loading @@ -103,8 +118,8 @@ class EnterSplitScreenByDragFromTaskbar( @Presubmit @Test fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisible( secondaryApp, landscapePosLeft = true, portraitPosTop = true) fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisibleByDrag( secondaryApp) @Presubmit @Test Loading Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/CommonAssertions.kt +27 −2 Original line number Diff line number Diff line Loading @@ -99,15 +99,40 @@ fun FlickerTestParameter.splitAppLayerBoundsBecomesVisible( portraitPosTop: Boolean ) { assertLayers { this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component), isOptional = true) // TODO(b/242025948): Use SPLIT_SCREEN_DIVIDER_COMPONENT.or(component) for notContains // and isInvisible when they are ready. this.notContains(SPLIT_SCREEN_DIVIDER_COMPONENT) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT.or(component)) .notContains(component, isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .then() .isInvisible(component, isOptional = true) .then() .splitAppLayerBoundsSnapToDivider( component, landscapePosLeft, portraitPosTop, endRotation) } } 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) .then() .notContains(component, isOptional = true) .then() .isInvisible(SPLIT_SCREEN_DIVIDER_COMPONENT, isOptional = true) .then() .isInvisible(component, isOptional = true) .then() // TODO(b/245472831): Verify the component should snap to divider. .isVisible(component) } } fun FlickerTestParameter.splitAppLayerBoundsBecomesInvisible( component: IComponentMatcher, landscapePosLeft: Boolean, Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromAllApps.kt +19 −4 Original line number Diff line number Diff line Loading @@ -26,12 +26,14 @@ 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.SPLIT_SCREEN_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appWindowBecomesVisible import com.android.wm.shell.flicker.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper import com.android.wm.shell.flicker.layerBecomesVisible import com.android.wm.shell.flicker.layerIsVisibleAtEnd import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisible import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisibleByDrag import com.android.wm.shell.flicker.splitAppLayerBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.splitScreenDividerBecomesVisible import org.junit.Assume Loading Loading @@ -83,7 +85,20 @@ class EnterSplitScreenByDragFromAllApps( @Presubmit @Test fun splitScreenDividerBecomesVisible() = testSpec.splitScreenDividerBecomesVisible() fun splitScreenDividerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.splitScreenDividerBecomesVisible() } // TODO(b/245472831): Back to splitScreenDividerBecomesVisible after shell transition ready. @Presubmit @Test fun splitScreenDividerIsVisibleAtEnd_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.assertLayersEnd { this.isVisible(SPLIT_SCREEN_DIVIDER_COMPONENT) } } @Presubmit @Test Loading @@ -100,8 +115,8 @@ class EnterSplitScreenByDragFromAllApps( @Presubmit @Test fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisible( secondaryApp, landscapePosLeft = true, portraitPosTop = true) fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisibleByDrag( secondaryApp) @Presubmit @Test Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromNotification.kt +19 −4 Original line number Diff line number Diff line Loading @@ -28,11 +28,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.SPLIT_SCREEN_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper import com.android.wm.shell.flicker.layerBecomesVisible import com.android.wm.shell.flicker.layerIsVisibleAtEnd import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisible import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisibleByDrag import com.android.wm.shell.flicker.splitAppLayerBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.splitScreenDividerBecomesVisible import org.junit.Assume Loading Loading @@ -97,7 +99,20 @@ class EnterSplitScreenByDragFromNotification( @Presubmit @Test fun splitScreenDividerBecomesVisible() = testSpec.splitScreenDividerBecomesVisible() fun splitScreenDividerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.splitScreenDividerBecomesVisible() } // TODO(b/245472831): Back to splitScreenDividerBecomesVisible after shell transition ready. @Presubmit @Test fun splitScreenDividerIsVisibleAtEnd_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.assertLayersEnd { this.isVisible(SPLIT_SCREEN_DIVIDER_COMPONENT) } } @Presubmit @Test Loading @@ -115,8 +130,8 @@ class EnterSplitScreenByDragFromNotification( @Presubmit @Test fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisible( sendNotificationApp, landscapePosLeft = true, portraitPosTop = true) fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisibleByDrag( sendNotificationApp) @Presubmit @Test Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/splitscreen/EnterSplitScreenByDragFromTaskbar.kt +19 −4 Original line number Diff line number Diff line Loading @@ -26,12 +26,14 @@ 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.SPLIT_SCREEN_DIVIDER_COMPONENT import com.android.wm.shell.flicker.appWindowBecomesVisible import com.android.wm.shell.flicker.appWindowIsVisibleAtEnd import com.android.wm.shell.flicker.helpers.SplitScreenHelper import com.android.wm.shell.flicker.layerBecomesVisible import com.android.wm.shell.flicker.layerIsVisibleAtEnd import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisible import com.android.wm.shell.flicker.splitAppLayerBoundsBecomesVisibleByDrag import com.android.wm.shell.flicker.splitAppLayerBoundsIsVisibleAtEnd import com.android.wm.shell.flicker.splitScreenDividerBecomesVisible import org.junit.Assume Loading Loading @@ -86,7 +88,20 @@ class EnterSplitScreenByDragFromTaskbar( @Presubmit @Test fun splitScreenDividerBecomesVisible() = testSpec.splitScreenDividerBecomesVisible() fun splitScreenDividerBecomesVisible() { Assume.assumeFalse(isShellTransitionsEnabled) testSpec.splitScreenDividerBecomesVisible() } // TODO(b/245472831): Back to splitScreenDividerBecomesVisible after shell transition ready. @Presubmit @Test fun splitScreenDividerIsVisibleAtEnd_ShellTransit() { Assume.assumeTrue(isShellTransitionsEnabled) testSpec.assertLayersEnd { this.isVisible(SPLIT_SCREEN_DIVIDER_COMPONENT) } } @Presubmit @Test Loading @@ -103,8 +118,8 @@ class EnterSplitScreenByDragFromTaskbar( @Presubmit @Test fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisible( secondaryApp, landscapePosLeft = true, portraitPosTop = true) fun secondaryAppBoundsBecomesVisible() = testSpec.splitAppLayerBoundsBecomesVisibleByDrag( secondaryApp) @Presubmit @Test Loading