Loading libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/flicker/DesktopModeFlickerScenarios.kt +71 −65 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.tools.flicker.AssertionInvocationGroup import android.tools.flicker.assertors.assertions.AppLayerIsInvisibleAtEnd import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAlways import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAtStart import android.tools.flicker.assertors.assertions.AppWindowBecomesVisible import android.tools.flicker.assertors.assertions.AppWindowHasDesktopModeInitialBoundsAtTheEnd import android.tools.flicker.assertors.assertions.AppWindowHasSizeOfAtLeast import android.tools.flicker.assertors.assertions.AppWindowIsInvisibleAtEnd Loading Loading @@ -52,6 +53,7 @@ class DesktopModeFlickerScenarios { transitions: Collection<Transition> ): Collection<Transition> { return transitions.filter { // TODO(351168217) Use jank CUJ to extract a longer trace it.type == TransitionType.DESKTOP_MODE_END_DRAG_TO_DESKTOP } } Loading @@ -64,8 +66,10 @@ class DesktopModeFlickerScenarios { AppWindowOnTopAtEnd(Components.DESKTOP_MODE_APP), AppWindowHasDesktopModeInitialBoundsAtTheEnd( Components.DESKTOP_MODE_APP ), AppWindowBecomesVisible(DESKTOP_WALLPAPER) ) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) // Use this scenario for closing an app in desktop windowing, except the last app. For the Loading Loading @@ -96,7 +100,8 @@ class DesktopModeFlickerScenarios { AppWindowOnTopAtStart(Components.DESKTOP_MODE_APP), AppLayerIsVisibleAtStart(Components.DESKTOP_MODE_APP), AppLayerIsInvisibleAtEnd(Components.DESKTOP_MODE_APP), ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) val CLOSE_LAST_APP = Loading @@ -123,7 +128,8 @@ class DesktopModeFlickerScenarios { AppWindowIsInvisibleAtEnd(Components.DESKTOP_MODE_APP), LauncherWindowReplacesAppAsTopWindow(Components.DESKTOP_MODE_APP), AppWindowIsInvisibleAtEnd(DESKTOP_WALLPAPER) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) val CORNER_RESIZE = Loading @@ -147,12 +153,12 @@ class DesktopModeFlickerScenarios { .setTargetTag(CujType.CUJ_DESKTOP_MODE_RESIZE_WINDOW) .setTransitionMatcher( TaggedCujTransitionMatcher(associatedTransitionRequired = false) ).build(), ) .build(), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( AppWindowHasSizeOfAtLeast(Components.DESKTOP_MODE_APP, 770, 700) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), listOf(AppWindowHasSizeOfAtLeast(Components.DESKTOP_MODE_APP, 770, 700)) .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) } } Loading
libs/WindowManager/Shell/tests/flicker/service/src/com/android/wm/shell/flicker/service/desktopmode/flicker/DesktopModeFlickerScenarios.kt +71 −65 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ import android.tools.flicker.AssertionInvocationGroup import android.tools.flicker.assertors.assertions.AppLayerIsInvisibleAtEnd import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAlways import android.tools.flicker.assertors.assertions.AppLayerIsVisibleAtStart import android.tools.flicker.assertors.assertions.AppWindowBecomesVisible import android.tools.flicker.assertors.assertions.AppWindowHasDesktopModeInitialBoundsAtTheEnd import android.tools.flicker.assertors.assertions.AppWindowHasSizeOfAtLeast import android.tools.flicker.assertors.assertions.AppWindowIsInvisibleAtEnd Loading Loading @@ -52,6 +53,7 @@ class DesktopModeFlickerScenarios { transitions: Collection<Transition> ): Collection<Transition> { return transitions.filter { // TODO(351168217) Use jank CUJ to extract a longer trace it.type == TransitionType.DESKTOP_MODE_END_DRAG_TO_DESKTOP } } Loading @@ -64,8 +66,10 @@ class DesktopModeFlickerScenarios { AppWindowOnTopAtEnd(Components.DESKTOP_MODE_APP), AppWindowHasDesktopModeInitialBoundsAtTheEnd( Components.DESKTOP_MODE_APP ), AppWindowBecomesVisible(DESKTOP_WALLPAPER) ) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) // Use this scenario for closing an app in desktop windowing, except the last app. For the Loading Loading @@ -96,7 +100,8 @@ class DesktopModeFlickerScenarios { AppWindowOnTopAtStart(Components.DESKTOP_MODE_APP), AppLayerIsVisibleAtStart(Components.DESKTOP_MODE_APP), AppLayerIsInvisibleAtEnd(Components.DESKTOP_MODE_APP), ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) val CLOSE_LAST_APP = Loading @@ -123,7 +128,8 @@ class DesktopModeFlickerScenarios { AppWindowIsInvisibleAtEnd(Components.DESKTOP_MODE_APP), LauncherWindowReplacesAppAsTopWindow(Components.DESKTOP_MODE_APP), AppWindowIsInvisibleAtEnd(DESKTOP_WALLPAPER) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) val CORNER_RESIZE = Loading @@ -147,12 +153,12 @@ class DesktopModeFlickerScenarios { .setTargetTag(CujType.CUJ_DESKTOP_MODE_RESIZE_WINDOW) .setTransitionMatcher( TaggedCujTransitionMatcher(associatedTransitionRequired = false) ).build(), ) .build(), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( AppWindowHasSizeOfAtLeast(Components.DESKTOP_MODE_APP, 770, 700) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), listOf(AppWindowHasSizeOfAtLeast(Components.DESKTOP_MODE_APP, 770, 700)) .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) } }