Loading tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppBackButtonTest.kt +38 −22 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.wm.flicker.close import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.RequiresDevice import androidx.test.platform.app.InstrumentationRegistry Loading Loading @@ -50,7 +49,6 @@ import org.junit.runners.Parameterized * Test app closes by pressing back button * To run this test: `atest FlickerTests:CloseAppBackButtonTest` */ @Presubmit @RequiresDevice @RunWith(Parameterized::class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading @@ -65,7 +63,7 @@ class CloseAppBackButtonTest( val testApp = SimpleAppHelper(instrumentation) return FlickerTestRunnerFactory.getInstance() .buildTest(instrumentation, repetitions = 5) { configuration -> withTestName { buildTestTag("closeAppBackButton", configuration) } withTestName { buildTestTag(configuration) } repeat { configuration.repetitions } setup { test { Loading @@ -89,11 +87,12 @@ class CloseAppBackButtonTest( } } assertions { val isRotated = configuration.startRotation.isRotated() presubmit { windowManagerTrace { navBarWindowIsAlwaysVisible() statusBarWindowIsAlwaysVisible() visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173684672) launcherReplacesAppWindowAsTopWindow(testApp) wallpaperWindowBecomesVisible() } Loading @@ -101,17 +100,34 @@ class CloseAppBackButtonTest( layersTrace { noUncoveredRegions(configuration.startRotation, Surface.ROTATION_0) navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0, enabled = !configuration.startRotation.isRotated()) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0, enabled = !configuration.startRotation.isRotated()) navBarLayerIsAlwaysVisible() statusBarLayerIsAlwaysVisible() wallpaperLayerReplacesAppLayer(testApp) if (!isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } flaky { windowManagerTrace { visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173684672) } layersTrace { visibleLayersShownMoreThanOneConsecutiveEntry(bugId = 173684672) wallpaperLayerReplacesAppLayer(testApp) if (isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } } } Loading tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppHomeButtonTest.kt +38 −19 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.server.wm.flicker.visibleWindowsShownMoreThanOneConsecutiveEn import com.android.server.wm.flicker.visibleLayersShownMoreThanOneConsecutiveEntry import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.helpers.buildTestTag import com.android.server.wm.flicker.helpers.isRotated import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.repetitions import com.android.server.wm.flicker.startRotation Loading Loading @@ -64,7 +65,7 @@ class CloseAppHomeButtonTest( val testApp = SimpleAppHelper(instrumentation) return FlickerTestRunnerFactory.getInstance() .buildTest(instrumentation, repetitions = 5) { configuration -> withTestName { buildTestTag("closeAppHomeButton", configuration) } withTestName { buildTestTag(configuration) } repeat { configuration.repetitions } setup { test { Loading @@ -88,28 +89,46 @@ class CloseAppHomeButtonTest( } } assertions { val isRotated = configuration.startRotation.isRotated() presubmit { windowManagerTrace { navBarWindowIsAlwaysVisible() statusBarWindowIsAlwaysVisible() visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173689015) launcherReplacesAppWindowAsTopWindow(testApp) wallpaperWindowBecomesVisible() } layersTrace { val isRotation0 = configuration.startRotation == Surface.ROTATION_0 noUncoveredRegions(configuration.startRotation, Surface.ROTATION_0) navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0, enabled = isRotation0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0, enabled = isRotation0) navBarLayerIsAlwaysVisible() statusBarLayerIsAlwaysVisible() wallpaperLayerReplacesAppLayer(testApp) if (!isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } flaky { windowManagerTrace { visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173689015) } layersTrace { visibleLayersShownMoreThanOneConsecutiveEntry(bugId = 173689015) wallpaperLayerReplacesAppLayer(testApp) if (isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } } } Loading Loading
tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppBackButtonTest.kt +38 −22 Original line number Diff line number Diff line Loading @@ -16,7 +16,6 @@ package com.android.server.wm.flicker.close import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.RequiresDevice import androidx.test.platform.app.InstrumentationRegistry Loading Loading @@ -50,7 +49,6 @@ import org.junit.runners.Parameterized * Test app closes by pressing back button * To run this test: `atest FlickerTests:CloseAppBackButtonTest` */ @Presubmit @RequiresDevice @RunWith(Parameterized::class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) Loading @@ -65,7 +63,7 @@ class CloseAppBackButtonTest( val testApp = SimpleAppHelper(instrumentation) return FlickerTestRunnerFactory.getInstance() .buildTest(instrumentation, repetitions = 5) { configuration -> withTestName { buildTestTag("closeAppBackButton", configuration) } withTestName { buildTestTag(configuration) } repeat { configuration.repetitions } setup { test { Loading @@ -89,11 +87,12 @@ class CloseAppBackButtonTest( } } assertions { val isRotated = configuration.startRotation.isRotated() presubmit { windowManagerTrace { navBarWindowIsAlwaysVisible() statusBarWindowIsAlwaysVisible() visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173684672) launcherReplacesAppWindowAsTopWindow(testApp) wallpaperWindowBecomesVisible() } Loading @@ -101,17 +100,34 @@ class CloseAppBackButtonTest( layersTrace { noUncoveredRegions(configuration.startRotation, Surface.ROTATION_0) navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0, enabled = !configuration.startRotation.isRotated()) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0, enabled = !configuration.startRotation.isRotated()) navBarLayerIsAlwaysVisible() statusBarLayerIsAlwaysVisible() wallpaperLayerReplacesAppLayer(testApp) if (!isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } flaky { windowManagerTrace { visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173684672) } layersTrace { visibleLayersShownMoreThanOneConsecutiveEntry(bugId = 173684672) wallpaperLayerReplacesAppLayer(testApp) if (isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } } } Loading
tests/FlickerTests/src/com/android/server/wm/flicker/close/CloseAppHomeButtonTest.kt +38 −19 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import com.android.server.wm.flicker.visibleWindowsShownMoreThanOneConsecutiveEn import com.android.server.wm.flicker.visibleLayersShownMoreThanOneConsecutiveEntry import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.helpers.buildTestTag import com.android.server.wm.flicker.helpers.isRotated import com.android.server.wm.flicker.helpers.setRotation import com.android.server.wm.flicker.repetitions import com.android.server.wm.flicker.startRotation Loading Loading @@ -64,7 +65,7 @@ class CloseAppHomeButtonTest( val testApp = SimpleAppHelper(instrumentation) return FlickerTestRunnerFactory.getInstance() .buildTest(instrumentation, repetitions = 5) { configuration -> withTestName { buildTestTag("closeAppHomeButton", configuration) } withTestName { buildTestTag(configuration) } repeat { configuration.repetitions } setup { test { Loading @@ -88,28 +89,46 @@ class CloseAppHomeButtonTest( } } assertions { val isRotated = configuration.startRotation.isRotated() presubmit { windowManagerTrace { navBarWindowIsAlwaysVisible() statusBarWindowIsAlwaysVisible() visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173689015) launcherReplacesAppWindowAsTopWindow(testApp) wallpaperWindowBecomesVisible() } layersTrace { val isRotation0 = configuration.startRotation == Surface.ROTATION_0 noUncoveredRegions(configuration.startRotation, Surface.ROTATION_0) navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0, enabled = isRotation0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0, enabled = isRotation0) navBarLayerIsAlwaysVisible() statusBarLayerIsAlwaysVisible() wallpaperLayerReplacesAppLayer(testApp) if (!isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } flaky { windowManagerTrace { visibleWindowsShownMoreThanOneConsecutiveEntry(bugId = 173689015) } layersTrace { visibleLayersShownMoreThanOneConsecutiveEntry(bugId = 173689015) wallpaperLayerReplacesAppLayer(testApp) if (isRotated) { navBarLayerRotatesAndScales(configuration.startRotation, Surface.ROTATION_0) statusBarLayerRotatesScales(configuration.startRotation, Surface.ROTATION_0) } } } } } Loading