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

Commit 6ff9779f authored by Ioana Moraru's avatar Ioana Moraru
Browse files

Use display information from layers trace on assertions

Displays were added to the SF trace. Parse them on flicker and use during navBarLayerRotatesAndScales and statusBarLayerRotatesScales assertion instead of relying on the test spec rotation.

Bug: 188792659
Test: atest FlickerTests
Test: atest WMShellFlickerTests
Change-Id: Ia206f67315c7a276614c03cbd4e610c24875d80f
parent 4172a3bc
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -20,13 +20,11 @@ import android.app.Instrumentation
import android.content.Context
import android.platform.test.annotations.Presubmit
import android.system.helpers.ActivityHelper
import android.view.Surface
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
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.endRotation
import com.android.server.wm.flicker.helpers.isRotated
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen
@@ -179,15 +177,9 @@ abstract class AppPairsTransition(protected val testSpec: FlickerTestParameter)

    @Presubmit
    @Test
    open fun navBarLayerRotatesAndScales() {
        testSpec.navBarLayerRotatesAndScales(Surface.ROTATION_0,
            testSpec.config.endRotation)
    }
    open fun navBarLayerRotatesAndScales() = testSpec.navBarLayerRotatesAndScales()

    @Presubmit
    @Test
    open fun statusBarLayerRotatesScales() {
        testSpec.statusBarLayerRotatesScales(Surface.ROTATION_0,
            testSpec.config.endRotation)
    }
    open fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales()
}
 No newline at end of file
+2 −4
Original line number Diff line number Diff line
@@ -107,13 +107,11 @@ class LegacySplitScreenToLauncher(

    @Presubmit
    @Test
    fun navBarLayerRotatesAndScales() =
        testSpec.navBarLayerRotatesAndScales(testSpec.config.endRotation)
    fun navBarLayerRotatesAndScales() = testSpec.navBarLayerRotatesAndScales()

    @Presubmit
    @Test
    fun statusBarLayerRotatesScales() =
        testSpec.statusBarLayerRotatesScales(testSpec.config.endRotation)
    fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales()

    @Presubmit
    @Test
+2 −5
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.FlickerTestParameterFactory
import com.android.server.wm.flicker.annotation.Group2
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.endRotation
import com.android.server.wm.flicker.entireScreenCovered
import com.android.server.wm.flicker.helpers.ImeAppHelper
import com.android.server.wm.flicker.helpers.WindowUtils
@@ -133,12 +132,10 @@ class ResizeLegacySplitScreen(
    fun entireScreenCovered() = testSpec.entireScreenCovered()

    @Test
    fun navBarLayerRotatesAndScales() =
        testSpec.navBarLayerRotatesAndScales(testSpec.config.endRotation)
    fun navBarLayerRotatesAndScales() = testSpec.navBarLayerRotatesAndScales()

    @Test
    fun statusBarLayerRotatesScales() =
        testSpec.statusBarLayerRotatesScales(testSpec.config.endRotation)
    fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales()

    @Test
    fun topAppLayerIsAlwaysVisible() {
+2 −7
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.FlickerTestParameterFactory
import com.android.server.wm.flicker.annotation.Group2
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.endRotation
import com.android.server.wm.flicker.helpers.launchSplitScreen
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.navBarLayerRotatesAndScales
@@ -75,15 +74,11 @@ class RotateOneLaunchedAppAndEnterSplitScreen(

    @Presubmit
    @Test
    fun navBarLayerRotatesAndScales() =
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation,
            testSpec.config.endRotation)
    fun navBarLayerRotatesAndScales() = testSpec.navBarLayerRotatesAndScales()

    @Presubmit
    @Test
    fun statusBarLayerRotatesScales() =
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation,
            testSpec.config.endRotation)
    fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales()

    @Presubmit
    @Test
+2 −5
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ import com.android.server.wm.flicker.FlickerTestParameter
import com.android.server.wm.flicker.FlickerTestParameterFactory
import com.android.server.wm.flicker.annotation.Group2
import com.android.server.wm.flicker.dsl.FlickerBuilder
import com.android.server.wm.flicker.endRotation
import com.android.server.wm.flicker.helpers.launchSplitScreen
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.navBarLayerRotatesAndScales
@@ -74,13 +73,11 @@ class RotateOneLaunchedAppInSplitScreenMode(

    @Presubmit
    @Test
    fun navBarLayerRotatesAndScales() = testSpec.navBarLayerRotatesAndScales(
        testSpec.config.startRotation, testSpec.config.endRotation)
    fun navBarLayerRotatesAndScales() = testSpec.navBarLayerRotatesAndScales()

    @Presubmit
    @Test
    fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales(
        testSpec.config.startRotation, testSpec.config.endRotation)
    fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales()

    @Presubmit
    @Test
Loading