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

Commit 231c0c74 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Promote stable rotation tests to presubmit" into sc-dev am: 4cdcf412

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13901255

Change-Id: I8645184b1fba1d05f7779960acad7a9bc68ee90a
parents 3ea58d76 4cdcf412
Loading
Loading
Loading
Loading
+22 −0
Original line number Diff line number Diff line
@@ -17,12 +17,14 @@
package com.android.server.wm.flicker.rotation

import android.platform.test.annotations.Presubmit
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.FlickerTestParameterFactory
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.helpers.SimpleAppHelper
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.runner.RunWith
@@ -51,6 +53,26 @@ class ChangeAppRotationTest(
            }
        }

    @FlakyTest(bugId = 151179149)
    @Test
    override fun focusDoesNotChange() {
        super.focusDoesNotChange()
    }

    @Presubmit
    @Test
    override fun navBarLayerRotatesAndScales() {
        Assume.assumeFalse(testSpec.isRotated)
        super.navBarLayerRotatesAndScales()
    }

    @FlakyTest(bugId = 140855415)
    @Test
    fun navBarLayerRotatesAndScales_flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        super.navBarLayerRotatesAndScales()
    }

    @Presubmit
    @Test
    fun screenshotLayerBecomesInvisible() {
+8 −9
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ package com.android.server.wm.flicker.rotation

import android.app.Instrumentation
import android.platform.test.annotations.Presubmit
import androidx.test.filters.FlakyTest
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.wm.flicker.FlickerBuilderProvider
import com.android.server.wm.flicker.FlickerTestParameter
@@ -74,13 +73,13 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter)
        testSpec.navBarWindowIsAlwaysVisible()
    }

    @FlakyTest(bugId = 140855415)
    @Presubmit
    @Test
    open fun navBarLayerIsAlwaysVisible() {
        testSpec.navBarLayerIsAlwaysVisible()
    }

    @FlakyTest(bugId = 140855415)
    @Presubmit
    @Test
    open fun navBarLayerRotatesAndScales() {
        testSpec.navBarLayerRotatesAndScales(
@@ -93,20 +92,20 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter)
        testSpec.statusBarWindowIsAlwaysVisible()
    }

    @FlakyTest(bugId = 140855415)
    @Presubmit
    @Test
    open fun statusBarLayerIsAlwaysVisible() {
        testSpec.statusBarLayerIsAlwaysVisible()
    }

    @FlakyTest(bugId = 140855415)
    @Presubmit
    @Test
    open fun statusBarLayerRotatesScales() {
        testSpec.statusBarLayerRotatesScales(
            testSpec.config.startRotation, testSpec.config.endRotation)
    }

    @FlakyTest(bugId = 140855415)
    @Presubmit
    @Test
    open fun visibleLayersShownMoreThanOneConsecutiveEntry() {
        testSpec.assertLayers {
@@ -129,13 +128,13 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter)
            testSpec.config.endRotation, allStates = false)
    }

    @FlakyTest(bugId = 151179149)
    @Presubmit
    @Test
    open fun focusDoesNotChange() {
        testSpec.focusDoesNotChange()
    }

    @FlakyTest(bugId = 140855415)
    @Presubmit
    @Test
    open fun appLayerRotates_StartingPos() {
        testSpec.assertLayersStart {
@@ -143,7 +142,7 @@ abstract class RotationTransition(protected val testSpec: FlickerTestParameter)
        }
    }

    @FlakyTest(bugId = 140855415)
    @Presubmit
    @Test
    open fun appLayerRotates_EndingPos() {
        testSpec.assertLayersEnd {
+9 −12
Original line number Diff line number Diff line
@@ -22,7 +22,6 @@ import androidx.test.filters.RequiresDevice
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.FlickerTestParameterFactory
import com.android.server.wm.flicker.appWindowAlwaysVisibleOnTop
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.helpers.SeamlessRotationAppHelper
import com.android.server.wm.flicker.layerAlwaysVisible
@@ -61,26 +60,24 @@ class SeamlessAppRotationTest(

    @FlakyTest(bugId = 140855415)
    @Test
    override fun navBarWindowIsAlwaysVisible() = super.navBarWindowIsAlwaysVisible()
    override fun navBarLayerRotatesAndScales() {
        super.navBarLayerRotatesAndScales()
    }

    @FlakyTest(bugId = 140855415)
    @Test
    override fun statusBarWindowIsAlwaysVisible() = super.statusBarWindowIsAlwaysVisible()

    @FlakyTest(bugId = 147659548)
    @Test
    override fun noUncoveredRegions() = super.noUncoveredRegions()
    override fun statusBarLayerRotatesScales() {
        super.statusBarLayerRotatesScales()
    }

    @Presubmit
    @Test
    fun appWindowAlwaysVisibleOnTop() = testSpec.appWindowAlwaysVisibleOnTop(testApp.`package`)
    fun appLayerAlwaysVisible() {
        testSpec.layerAlwaysVisible(testApp.`package`)
    }

    @Presubmit
    @Test
    fun layerAlwaysVisible() = testSpec.layerAlwaysVisible(testApp.`package`)

    @FlakyTest(bugId = 147659548)
    @Test
    fun appLayerRotates() {
        testSpec.assertLayers {
            this.coversExactly(startingPos, testApp.`package`)