Loading libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeFlickerScenarios.kt +18 −6 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,14 @@ import android.tools.traces.wm.TransitionType class DesktopModeFlickerScenarios { class DesktopModeFlickerScenarios { companion object { companion object { // In DesktopMode, window snap can be done with just a single window. In this case, the // divider tiling between left and right window won't be shown, and hence its states are not // obtainable in test. // As the test should just focus on ensuring window goes to one side of the screen, an // acceptable approach is to ensure snapped window still fills > 95% of either side of the // screen. private const val SNAP_WINDOW_MAX_DIFF_THRESHOLD_RATIO = 0.05 val END_DRAG_TO_DESKTOP = val END_DRAG_TO_DESKTOP = FlickerConfigEntry( FlickerConfigEntry( scenarioId = ScenarioId("END_DRAG_TO_DESKTOP"), scenarioId = ScenarioId("END_DRAG_TO_DESKTOP"), Loading Loading @@ -230,9 +238,11 @@ class DesktopModeFlickerScenarios { TaggedCujTransitionMatcher(associatedTransitionRequired = false) TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) ) .build(), .build(), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( listOf(AppWindowCoversLeftHalfScreenAtEnd(DESKTOP_MODE_APP)) AppWindowCoversLeftHalfScreenAtEnd( .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), DESKTOP_MODE_APP, SNAP_WINDOW_MAX_DIFF_THRESHOLD_RATIO ) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) ) val SNAP_RESIZE_RIGHT_WITH_BUTTON = val SNAP_RESIZE_RIGHT_WITH_BUTTON = Loading @@ -245,9 +255,11 @@ class DesktopModeFlickerScenarios { TaggedCujTransitionMatcher(associatedTransitionRequired = false) TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) ) .build(), .build(), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( listOf(AppWindowCoversRightHalfScreenAtEnd(DESKTOP_MODE_APP)) AppWindowCoversRightHalfScreenAtEnd( .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), DESKTOP_MODE_APP, SNAP_WINDOW_MAX_DIFF_THRESHOLD_RATIO ) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) ) val SNAP_RESIZE_LEFT_WITH_DRAG = val SNAP_RESIZE_LEFT_WITH_DRAG = Loading Loading
libs/WindowManager/Shell/tests/e2e/desktopmode/flicker-service/src/com/android/wm/shell/flicker/DesktopModeFlickerScenarios.kt +18 −6 Original line number Original line Diff line number Diff line Loading @@ -62,6 +62,14 @@ import android.tools.traces.wm.TransitionType class DesktopModeFlickerScenarios { class DesktopModeFlickerScenarios { companion object { companion object { // In DesktopMode, window snap can be done with just a single window. In this case, the // divider tiling between left and right window won't be shown, and hence its states are not // obtainable in test. // As the test should just focus on ensuring window goes to one side of the screen, an // acceptable approach is to ensure snapped window still fills > 95% of either side of the // screen. private const val SNAP_WINDOW_MAX_DIFF_THRESHOLD_RATIO = 0.05 val END_DRAG_TO_DESKTOP = val END_DRAG_TO_DESKTOP = FlickerConfigEntry( FlickerConfigEntry( scenarioId = ScenarioId("END_DRAG_TO_DESKTOP"), scenarioId = ScenarioId("END_DRAG_TO_DESKTOP"), Loading Loading @@ -230,9 +238,11 @@ class DesktopModeFlickerScenarios { TaggedCujTransitionMatcher(associatedTransitionRequired = false) TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) ) .build(), .build(), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( listOf(AppWindowCoversLeftHalfScreenAtEnd(DESKTOP_MODE_APP)) AppWindowCoversLeftHalfScreenAtEnd( .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), DESKTOP_MODE_APP, SNAP_WINDOW_MAX_DIFF_THRESHOLD_RATIO ) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) ) val SNAP_RESIZE_RIGHT_WITH_BUTTON = val SNAP_RESIZE_RIGHT_WITH_BUTTON = Loading @@ -245,9 +255,11 @@ class DesktopModeFlickerScenarios { TaggedCujTransitionMatcher(associatedTransitionRequired = false) TaggedCujTransitionMatcher(associatedTransitionRequired = false) ) ) .build(), .build(), assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + assertions = AssertionTemplates.DESKTOP_MODE_APP_VISIBILITY_ASSERTIONS + listOf( listOf(AppWindowCoversRightHalfScreenAtEnd(DESKTOP_MODE_APP)) AppWindowCoversRightHalfScreenAtEnd( .associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), DESKTOP_MODE_APP, SNAP_WINDOW_MAX_DIFF_THRESHOLD_RATIO ) ).associateBy({ it }, { AssertionInvocationGroup.BLOCKING }), ) ) val SNAP_RESIZE_LEFT_WITH_DRAG = val SNAP_RESIZE_LEFT_WITH_DRAG = Loading