Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ecdc389 authored by Chris Li's avatar Chris Li Committed by Android (Google) Code Review
Browse files

Merge "Fix SetRequestedOrientationWhilePinnedTest with Shell transition"

parents 0ee62beb 85e4cc2e
Loading
Loading
Loading
Loading
+5 −35
Original line number Diff line number Diff line
@@ -26,11 +26,9 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory
import com.android.server.wm.flicker.annotation.Group4
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
import com.android.wm.shell.flicker.testapp.Components.FixedActivity.EXTRA_FIXED_ORIENTATION
import com.android.wm.shell.flicker.testapp.Components.PipActivity.EXTRA_ENTER_PIP
import org.junit.Assume.assumeFalse
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
@@ -39,7 +37,7 @@ import org.junit.runners.Parameterized

/**
 * Test Pip with orientation changes.
 * To run this test: `atest WMShellFlickerTests:PipOrientationTest`
 * To run this test: `atest WMShellFlickerTests:SetRequestedOrientationWhilePinnedTest`
 */
@RequiresDevice
@RunWith(Parameterized::class)
@@ -84,8 +82,6 @@ class SetRequestedOrientationWhilePinnedTest(
    @Presubmit
    @Test
    fun displayEndsAt90Degrees() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        testSpec.assertWmEnd {
            hasRotation(Surface.ROTATION_90)
        }
@@ -93,41 +89,23 @@ class SetRequestedOrientationWhilePinnedTest(

    @Presubmit
    @Test
    override fun navBarLayerIsVisible() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        super.navBarLayerIsVisible()
    }
    override fun navBarLayerIsVisible() = super.navBarLayerIsVisible()

    @Presubmit
    @Test
    override fun statusBarLayerIsVisible() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        super.statusBarLayerIsVisible()
    }
    override fun statusBarLayerIsVisible() = super.statusBarLayerIsVisible()

    @FlakyTest
    @Test
    override fun navBarLayerRotatesAndScales() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        super.navBarLayerRotatesAndScales()
    }
    override fun navBarLayerRotatesAndScales() = super.navBarLayerRotatesAndScales()

    @FlakyTest(bugId = 206753786)
    @Test
    override fun statusBarLayerRotatesScales() {
        // This test doesn't work in shell transitions because of b/206753786
        assumeFalse(isShellTransitionsEnabled)
        super.statusBarLayerRotatesScales()
    }
    override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales()

    @Presubmit
    @Test
    fun pipWindowInsideDisplay() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        testSpec.assertWmStart {
            frameRegion(pipApp.component).coversAtMost(startingBounds)
        }
@@ -136,8 +114,6 @@ class SetRequestedOrientationWhilePinnedTest(
    @Presubmit
    @Test
    fun pipAppShowsOnTop() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        testSpec.assertWmEnd {
            isAppWindowOnTop(pipApp.component)
        }
@@ -146,8 +122,6 @@ class SetRequestedOrientationWhilePinnedTest(
    @Presubmit
    @Test
    fun pipLayerInsideDisplay() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        testSpec.assertLayersStart {
            visibleRegion(pipApp.component).coversAtMost(startingBounds)
        }
@@ -156,8 +130,6 @@ class SetRequestedOrientationWhilePinnedTest(
    @Presubmit
    @Test
    fun pipAlwaysVisible() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        testSpec.assertWm {
            this.isAppWindowVisible(pipApp.component)
        }
@@ -166,8 +138,6 @@ class SetRequestedOrientationWhilePinnedTest(
    @Presubmit
    @Test
    fun pipAppLayerCoversFullScreen() {
        // This test doesn't work in shell transitions because of b/208576418
        assumeFalse(isShellTransitionsEnabled)
        testSpec.assertLayersEnd {
            visibleRegion(pipApp.component).coversExactly(endingBounds)
        }