Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/helpers/PipAppHelper.kt +4 −4 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( stringExtras: Map<String, String> ) { super.launchViaIntent(wmHelper, expectedWindowName, action, stringExtras) wmHelper.waitFor("hasPipWindow") { it.wmState.hasPipWindow() } wmHelper.waitPipShown() } private fun focusOnObject(selector: BySelector): Boolean { Loading @@ -88,7 +88,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( clickObject(ENTER_PIP_BUTTON_ID) // Wait on WMHelper or simply wait for 3 seconds wmHelper?.waitFor("hasPipWindow") { it.wmState.hasPipWindow() } ?: SystemClock.sleep(3_000) wmHelper?.waitPipShown() ?: SystemClock.sleep(3_000) // when entering pip, the dismiss button is visible at the start. to ensure the pip // animation is complete, wait until the pip dismiss button is no longer visible. // b/176822698: dismiss-only state will be removed in the future Loading Loading @@ -148,7 +148,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( } // Wait for animation to complete. wmHelper.waitFor("!hasPipWindow") { !it.wmState.hasPipWindow() } wmHelper.waitPipGone() wmHelper.waitForHomeActivityVisible() } Loading @@ -165,7 +165,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( ?: error("PIP window expand button not found") val expandButtonBounds = expandPipObject.visibleBounds uiDevice.click(expandButtonBounds.centerX(), expandButtonBounds.centerY()) wmHelper.waitFor("!hasPipWindow") { !it.wmState.hasPipWindow() } wmHelper.waitPipGone() wmHelper.waitForAppTransitionIdle() } Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt +6 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.FlakyTest Loading Loading @@ -181,13 +182,14 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) { } /** * Checks the focus doesn't change during the animation * Checks that the focus changes between the [pipApp] window and the launcher when * closing the pip window */ @FlakyTest @Postsubmit @Test fun focusDoesNotChange() { fun focusChanges() { testSpec.assertEventLog { this.focusDoesNotChange() this.focusChanges(pipApp.`package`, "NexusLauncherActivity") } } Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ class EnterPipToOtherOrientationTest( // Enter PiP, and assert that the PiP is within bounds now that the device is back // in portrait broadcastActionTrigger.doAction(ACTION_ENTER_PIP) wmHelper.waitFor { it.wmState.hasPipWindow() } wmHelper.waitPipShown() wmHelper.waitForAppTransitionIdle() // during rotation the status bar becomes invisible and reappears at the end wmHelper.waitForNavBarStatusBarVisible() Loading libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipTransition.kt +5 −6 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package com.android.wm.shell.flicker.pip import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.FlakyTest import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.LAUNCHER_COMPONENT import com.android.server.wm.flicker.dsl.FlickerBuilder Loading Loading @@ -96,14 +96,13 @@ abstract class ExitPipTransition(testSpec: FlickerTestParameter) : PipTransition } /** * Checks that the focus changes between the [pipApp] window and the launcher when * closing the pip window * Checks that the focus doesn't change between windows during the transition */ @FlakyTest(bugId = 151179149) @Postsubmit @Test open fun focusChanges() { open fun focusDoesNotChange() { testSpec.assertEventLog { this.focusChanges(pipApp.launcherName, "NexusLauncherActivity") this.focusDoesNotChange() } } } No newline at end of file libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithSwipeDownTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class ExitPipWithSwipeDownTest(testSpec: FlickerTestParameter) : ExitPipTransiti val pipCenterY = pipRegion.centerY() val displayCenterX = device.displayWidth / 2 device.swipe(pipCenterX, pipCenterY, displayCenterX, device.displayHeight, 10) wmHelper.waitFor("!hasPipWindow") { !it.wmState.hasPipWindow() } wmHelper.waitPipGone() wmHelper.waitForWindowSurfaceDisappeared(pipApp.component) wmHelper.waitForAppTransitionIdle() } Loading Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/helpers/PipAppHelper.kt +4 −4 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( stringExtras: Map<String, String> ) { super.launchViaIntent(wmHelper, expectedWindowName, action, stringExtras) wmHelper.waitFor("hasPipWindow") { it.wmState.hasPipWindow() } wmHelper.waitPipShown() } private fun focusOnObject(selector: BySelector): Boolean { Loading @@ -88,7 +88,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( clickObject(ENTER_PIP_BUTTON_ID) // Wait on WMHelper or simply wait for 3 seconds wmHelper?.waitFor("hasPipWindow") { it.wmState.hasPipWindow() } ?: SystemClock.sleep(3_000) wmHelper?.waitPipShown() ?: SystemClock.sleep(3_000) // when entering pip, the dismiss button is visible at the start. to ensure the pip // animation is complete, wait until the pip dismiss button is no longer visible. // b/176822698: dismiss-only state will be removed in the future Loading Loading @@ -148,7 +148,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( } // Wait for animation to complete. wmHelper.waitFor("!hasPipWindow") { !it.wmState.hasPipWindow() } wmHelper.waitPipGone() wmHelper.waitForHomeActivityVisible() } Loading @@ -165,7 +165,7 @@ class PipAppHelper(instrumentation: Instrumentation) : BaseAppHelper( ?: error("PIP window expand button not found") val expandButtonBounds = expandPipObject.visibleBounds uiDevice.click(expandButtonBounds.centerX(), expandButtonBounds.centerY()) wmHelper.waitFor("!hasPipWindow") { !it.wmState.hasPipWindow() } wmHelper.waitPipGone() wmHelper.waitForAppTransitionIdle() } Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipTest.kt +6 −4 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ package com.android.wm.shell.flicker.pip import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.FlakyTest Loading Loading @@ -181,13 +182,14 @@ class EnterPipTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) { } /** * Checks the focus doesn't change during the animation * Checks that the focus changes between the [pipApp] window and the launcher when * closing the pip window */ @FlakyTest @Postsubmit @Test fun focusDoesNotChange() { fun focusChanges() { testSpec.assertEventLog { this.focusDoesNotChange() this.focusChanges(pipApp.`package`, "NexusLauncherActivity") } } Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/EnterPipToOtherOrientationTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ class EnterPipToOtherOrientationTest( // Enter PiP, and assert that the PiP is within bounds now that the device is back // in portrait broadcastActionTrigger.doAction(ACTION_ENTER_PIP) wmHelper.waitFor { it.wmState.hasPipWindow() } wmHelper.waitPipShown() wmHelper.waitForAppTransitionIdle() // during rotation the status bar becomes invisible and reappears at the end wmHelper.waitForNavBarStatusBarVisible() Loading
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipTransition.kt +5 −6 Original line number Diff line number Diff line Loading @@ -16,9 +16,9 @@ package com.android.wm.shell.flicker.pip import android.platform.test.annotations.Postsubmit import android.platform.test.annotations.Presubmit import android.view.Surface import androidx.test.filters.FlakyTest import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.LAUNCHER_COMPONENT import com.android.server.wm.flicker.dsl.FlickerBuilder Loading Loading @@ -96,14 +96,13 @@ abstract class ExitPipTransition(testSpec: FlickerTestParameter) : PipTransition } /** * Checks that the focus changes between the [pipApp] window and the launcher when * closing the pip window * Checks that the focus doesn't change between windows during the transition */ @FlakyTest(bugId = 151179149) @Postsubmit @Test open fun focusChanges() { open fun focusDoesNotChange() { testSpec.assertEventLog { this.focusChanges(pipApp.launcherName, "NexusLauncherActivity") this.focusDoesNotChange() } } } No newline at end of file
libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/ExitPipWithSwipeDownTest.kt +1 −1 Original line number Diff line number Diff line Loading @@ -63,7 +63,7 @@ class ExitPipWithSwipeDownTest(testSpec: FlickerTestParameter) : ExitPipTransiti val pipCenterY = pipRegion.centerY() val displayCenterX = device.displayWidth / 2 device.swipe(pipCenterX, pipCenterY, displayCenterX, device.displayHeight, 10) wmHelper.waitFor("!hasPipWindow") { !it.wmState.hasPipWindow() } wmHelper.waitPipGone() wmHelper.waitForWindowSurfaceDisappeared(pipApp.component) wmHelper.waitForAppTransitionIdle() } Loading