From d6764fd92069aadf14d163b31bc7cb9d37cf9e2e Mon Sep 17 00:00:00 2001 From: Nataniel Borges Date: Wed, 11 Jan 2023 14:01:34 +0000 Subject: [PATCH] Re-enable EnterPipToOtherOrientationTest on tablet The original issue found during triage has already been addressed Fixes: 235375583 Test: atest WMShellFlickerTests Change-Id: If7ce04cfb8e33c24f1b9a564f6c895e93ad6256d --- .../pip/EnterPipToOtherOrientationTest.kt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt index 94a16da1c34b5..02d50f47288e6 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt @@ -17,6 +17,7 @@ package com.android.wm.shell.flicker.pip import android.app.Activity +import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import androidx.test.filters.RequiresDevice import com.android.server.wm.flicker.FlickerBuilder @@ -28,6 +29,7 @@ import com.android.server.wm.flicker.helpers.WindowUtils import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory import com.android.server.wm.flicker.testapp.ActivityOptions.Pip.ACTION_ENTER_PIP import com.android.server.wm.flicker.testapp.ActivityOptions.PortraitOnlyActivity.EXTRA_FIXED_ORIENTATION +import com.android.server.wm.traces.common.ComponentNameMatcher import com.android.server.wm.traces.common.service.PlatformConsts import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_PORTRAIT @@ -163,9 +165,24 @@ open class EnterPipToOtherOrientationTest(flicker: FlickerTest) : PipTransition( @Presubmit @Test fun pipAppLayerCoversFullScreenOnStart() { + Assume.assumeFalse(tapl.isTablet) flicker.assertLayersStart { visibleRegion(pipApp).coversExactly(startingBounds) } } + /** + * Checks that the visible region of [pipApp] covers the full display area at the start of the + * transition + */ + @Postsubmit + @Test + fun pipAppLayerPlusLetterboxCoversFullScreenOnStartTablet() { + Assume.assumeFalse(tapl.isTablet) + flicker.assertLayersStart { + visibleRegion(pipApp.or(ComponentNameMatcher.LETTERBOX)) + .coversExactly(startingBounds) + } + } + /** * Checks that the visible region of [testApp] plus the visible region of [pipApp] cover the * full display area at the end of the transition