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

Commit e8ef54ec authored by Antonella Dellanzo's avatar Antonella Dellanzo
Browse files

Update ChangeAppRotation test

Updating the ChangeAppRotationTest test, adding new WM and layers
assertions. Also fixing the command to run this test in the comment at
the beginning.

Test: atest FlickerTests:ChangeAppRotationTest
Bug: b/171049719
Change-Id: I24a4bc74690363036174da1a2683c932ca349ec1
parent 94590a89
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
package com.android.server.wm.flicker.rotation

import android.platform.test.annotations.Presubmit
import androidx.test.filters.RequiresDevice
import android.view.Surface
import androidx.test.filters.RequiresDevice
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.wm.flicker.Flicker
import com.android.server.wm.flicker.FlickerTestRunner
@@ -27,8 +27,8 @@ import com.android.server.wm.flicker.endRotation
import com.android.server.wm.flicker.focusDoesNotChange
import com.android.server.wm.flicker.helpers.StandardAppHelper
import com.android.server.wm.flicker.helpers.WindowUtils
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.helpers.buildTestTag
import com.android.server.wm.flicker.helpers.setRotation
import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen
import com.android.server.wm.flicker.navBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.navBarLayerRotatesAndScales
@@ -36,6 +36,8 @@ import com.android.server.wm.flicker.navBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.noUncoveredRegions
import com.android.server.wm.flicker.repetitions
import com.android.server.wm.flicker.startRotation
import com.android.server.wm.flicker.visibleLayersShownMoreThanOneConsecutiveEntry
import com.android.server.wm.flicker.visibleWindowsShownMoreThanOneConsecutiveEntry
import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
@@ -46,7 +48,7 @@ import org.junit.runners.Parameterized

/**
 * Cycle through supported app rotations.
 * To run this test: `atest FlickerTest:ChangeAppRotationTest`
 * To run this test: `atest FlickerTests:ChangeAppRotationTest`
 */
@Presubmit
@RequiresDevice
@@ -96,6 +98,7 @@ class ChangeAppRotationTest(
                        windowManagerTrace {
                            navBarWindowIsAlwaysVisible()
                            statusBarWindowIsAlwaysVisible()
                            visibleWindowsShownMoreThanOneConsecutiveEntry()
                        }

                        layersTrace {
@@ -107,6 +110,7 @@ class ChangeAppRotationTest(
                                configuration.endRotation)
                            statusBarLayerRotatesScales(configuration.startRotation,
                                configuration.endRotation)
                            visibleLayersShownMoreThanOneConsecutiveEntry(bugId = 140855415)
                        }

                        layersTrace {
@@ -128,7 +132,7 @@ class ChangeAppRotationTest(
                                        .then()
                                        .showsLayer(SCREENSHOT_LAYER)
                                        .then()
                                showsLayer(testApp.getPackage())
                                        .showsLayer(testApp.getPackage())
                            }
                        }