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

Commit 569596b1 authored by Nataniel Borges's avatar Nataniel Borges Committed by Android (Google) Code Review
Browse files

Merge "Fix PipRotation tests"

parents cbbec6b5 ebda4611
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.wm.shell.flicker.pip

import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Presubmit
import android.view.Surface
import androidx.test.filters.RequiresDevice
@@ -88,7 +89,7 @@ open class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec
    /**
     * Checks [pipApp] layer remains visible throughout the animation
     */
    @Presubmit
    @FlakyTest
    @Test
    open fun pipAppLayerAlwaysVisible() {
        testSpec.assertLayers {
+28 −4
Original line number Diff line number Diff line
@@ -106,9 +106,9 @@ open class PipRotationTest(testSpec: FlickerTestParameter) : PipTransition(testS
     */
    @Presubmit
    @Test
    fun appLayerRotates_StartingBounds() {
    fun fixedAppLayer_StartingBounds() {
        testSpec.assertLayersStart {
            visibleRegion(fixedApp).coversExactly(screenBoundsStart)
            visibleRegion(fixedApp).coversAtMost(screenBoundsStart)
        }
    }

@@ -117,9 +117,33 @@ open class PipRotationTest(testSpec: FlickerTestParameter) : PipTransition(testS
     */
    @Presubmit
    @Test
    fun appLayerRotates_EndingBounds() {
    fun fixedAppLayer_EndingBounds() {
        testSpec.assertLayersEnd {
            visibleRegion(fixedApp).coversExactly(screenBoundsEnd)
            visibleRegion(fixedApp).coversAtMost(screenBoundsEnd)
        }
    }

    /**
     * Checks that [fixedApp] plus [pipApp] layers are within [screenBoundsEnd] at the start
     * of the transition
     */
    @Presubmit
    @Test
    fun appLayers_StartingBounds() {
        testSpec.assertLayersStart {
            visibleRegion(fixedApp.or(pipApp)).coversExactly(screenBoundsStart)
        }
    }

    /**
     * Checks that [fixedApp] plus [pipApp] layers are within [screenBoundsEnd] at the end
     * of the transition
     */
    @Presubmit
    @Test
    fun appLayers_EndingBounds() {
        testSpec.assertLayersEnd {
            visibleRegion(fixedApp.or(pipApp)).coversExactly(screenBoundsEnd)
        }
    }