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

Commit b3609458 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Promote passing Quick switch tests"

parents dbb511f1 91075030
Loading
Loading
Loading
Loading
+13 −14
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@

package com.android.server.wm.flicker.quickswitch

import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.RequiresDevice
@@ -103,7 +102,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun startsWithApp2WindowsCoverFullScreen() {
    open fun startsWithApp2WindowsCoverFullScreen() {
        testSpec.assertWmStart {
            this.visibleRegion(testApp2).coversExactly(startDisplayBounds)
        }
@@ -115,7 +114,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun startsWithApp2LayersCoverFullScreen() {
    open fun startsWithApp2LayersCoverFullScreen() {
        testSpec.assertLayersStart {
            this.visibleRegion(testApp2).coversExactly(startDisplayBounds)
        }
@@ -126,7 +125,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun startsWithApp2WindowBeingOnTop() {
    open fun startsWithApp2WindowBeingOnTop() {
        testSpec.assertWmStart {
            this.isAppWindowOnTop(testApp2)
        }
@@ -138,7 +137,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun endsWithApp1WindowsCoveringFullScreen() {
    open fun endsWithApp1WindowsCoveringFullScreen() {
        testSpec.assertWmEnd {
            this.visibleRegion(testApp1).coversExactly(startDisplayBounds)
        }
@@ -162,7 +161,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun endsWithApp1BeingOnTop() {
    open fun endsWithApp1BeingOnTop() {
        testSpec.assertWmEnd {
            this.isAppWindowOnTop(testApp1)
        }
@@ -174,7 +173,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun app1WindowBecomesAndStaysVisible() {
    open fun app1WindowBecomesAndStaysVisible() {
        testSpec.assertWm {
            this.isAppWindowInvisible(testApp1)
                .then()
@@ -190,7 +189,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun app1LayerBecomesAndStaysVisible() {
    open fun app1LayerBecomesAndStaysVisible() {
        testSpec.assertLayers {
            this.isInvisible(testApp1)
                .then()
@@ -204,7 +203,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun app2WindowBecomesAndStaysInvisible() {
    open fun app2WindowBecomesAndStaysInvisible() {
        testSpec.assertWm {
            this.isAppWindowVisible(testApp2)
                .then()
@@ -218,7 +217,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun app2LayerBecomesAndStaysInvisible() {
    open fun app2LayerBecomesAndStaysInvisible() {
        testSpec.assertLayers {
            this.isVisible(testApp2)
                .then()
@@ -233,7 +232,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun app1WindowIsVisibleOnceApp2WindowIsInvisible() {
    open fun app1WindowIsVisibleOnceApp2WindowIsInvisible() {
        testSpec.assertWm {
            this.isAppWindowVisible(testApp2)
                .then()
@@ -253,7 +252,7 @@ open class QuickSwitchBetweenTwoAppsBackTest(
     */
    @Presubmit
    @Test
    fun app1LayerIsVisibleOnceApp2LayerIsInvisible() {
    open fun app1LayerIsVisibleOnceApp2LayerIsInvisible() {
        testSpec.assertLayers {
            this.isVisible(testApp2)
                .then()
@@ -266,9 +265,9 @@ open class QuickSwitchBetweenTwoAppsBackTest(
    }

    /** {@inheritDoc} */
    @FlakyTest
    @Postsubmit
    @Test
    override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
    override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()

    /** {@inheritDoc} */
    @Postsubmit
+28 −4
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@

package com.android.server.wm.flicker.quickswitch

import android.platform.test.annotations.RequiresDevice
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.RequiresDevice
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group1
@@ -25,6 +25,7 @@ import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized
@@ -45,11 +46,34 @@ import org.junit.runners.Parameterized
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Group1
@FlakyTest(bugId = 228009808)
open class QuickSwitchBetweenTwoAppsBackTest_ShellTransit(testSpec: FlickerTestParameter)
    : QuickSwitchBetweenTwoAppsBackTest(testSpec) {
open class QuickSwitchBetweenTwoAppsBackTest_ShellTransit(
    testSpec: FlickerTestParameter
) : QuickSwitchBetweenTwoAppsBackTest(testSpec) {
    @Before
    override fun before() {
        Assume.assumeTrue(isShellTransitionsEnabled)
    }

    @FlakyTest(bugId = 228009808)
    @Test
    override fun app1LayerIsVisibleOnceApp2LayerIsInvisible() =
        super.app1LayerIsVisibleOnceApp2LayerIsInvisible()

    @FlakyTest(bugId = 228009808)
    @Test
    override fun app1WindowBecomesAndStaysVisible() = super.app1WindowBecomesAndStaysVisible()

    @FlakyTest(bugId = 228009808)
    @Test
    override fun endsWithApp1BeingOnTop() = super.endsWithApp1BeingOnTop()

    @FlakyTest(bugId = 239147075)
    @Test
    override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
        super.visibleLayersShownMoreThanOneConsecutiveEntry()

    @FlakyTest(bugId = 239147075)
    @Test
    override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
        super.visibleWindowsShownMoreThanOneConsecutiveEntry()
}
+4 −4
Original line number Diff line number Diff line
@@ -272,12 +272,12 @@ open class QuickSwitchBetweenTwoAppsForwardTest(
    }

    /** {@inheritDoc} */
    @FlakyTest
    @Postsubmit
    @Test
    override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
    override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()

    /** {@inheritDoc} */
    @Postsubmit
    @FlakyTest(bugId = 239148258)
    @Test
    override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
        super.visibleLayersShownMoreThanOneConsecutiveEntry()
@@ -289,7 +289,7 @@ open class QuickSwitchBetweenTwoAppsForwardTest(
        super.statusBarLayerPositionAtStartAndEnd()

    /** {@inheritDoc} */
    @Postsubmit
    @FlakyTest(bugId = 239148258)
    @Test
    override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
        super.visibleWindowsShownMoreThanOneConsecutiveEntry()
+18 −4
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@

package com.android.server.wm.flicker.quickswitch

import android.platform.test.annotations.RequiresDevice
import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.RequiresDevice
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.annotation.Group1
@@ -25,6 +25,7 @@ import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
import org.junit.Assume
import org.junit.Before
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
import org.junit.runners.Parameterized
@@ -45,11 +46,24 @@ import org.junit.runners.Parameterized
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Group1
@FlakyTest(bugId = 228009808)
open class QuickSwitchBetweenTwoAppsForwardTest_ShellTransit(testSpec: FlickerTestParameter)
    : QuickSwitchBetweenTwoAppsForwardTest(testSpec) {
open class QuickSwitchBetweenTwoAppsForwardTest_ShellTransit(
    testSpec: FlickerTestParameter
) : QuickSwitchBetweenTwoAppsForwardTest(testSpec) {
    @Before
    override fun before() {
        Assume.assumeTrue(isShellTransitionsEnabled)
    }

    @FlakyTest(bugId = 228009808)
    @Test
    override fun app2LayerIsVisibleOnceApp1LayerIsInvisible() =
        super.app2LayerIsVisibleOnceApp1LayerIsInvisible()

    @FlakyTest(bugId = 228009808)
    @Test
    override fun app2WindowBecomesAndStaysVisible() = super.app2WindowBecomesAndStaysVisible()

    @FlakyTest(bugId = 228009808)
    @Test
    override fun endsWithApp2BeingOnTop() = super.endsWithApp2BeingOnTop()
}
+4 −9
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.server.wm.flicker.quickswitch

import android.platform.test.annotations.FlakyTest
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.RequiresDevice
@@ -276,30 +277,24 @@ class QuickSwitchFromLauncherTest(testSpec: FlickerTestParameter) : BaseTest(tes
        }
    }

    /** {@inheritDoc} */
    @Postsubmit
    @Test
    override fun statusBarLayerPositionAtStartAndEnd() =
        super.statusBarLayerPositionAtStartAndEnd()

    /** {@inheritDoc} */
    @Postsubmit
    @Test
    override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()

    /** {@inheritDoc} */
    @Postsubmit
    @FlakyTest(bugId = 239148258)
    @Test
    override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
        super.visibleLayersShownMoreThanOneConsecutiveEntry()

    /** {@inheritDoc} */
    @Postsubmit
    @FlakyTest(bugId = 239148258)
    @Test
    override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
        super.visibleWindowsShownMoreThanOneConsecutiveEntry()

    companion object {
        /** {@inheritDoc} */
        private var startDisplayBounds = Rect.EMPTY

        @Parameterized.Parameters(name = "{0}")