diff options
| author | 2022-02-24 10:21:28 +0100 | |
|---|---|---|
| committer | 2022-02-24 11:24:20 +0100 | |
| commit | e74d47839ab4747ae7d125bc147c5dbbb520edce (patch) | |
| tree | 2785bdf0e08f5366fe97ef99d93f0f0e6f33b234 /libs/WindowManager/Shell | |
| parent | 3a4774d2c683e7792306706a2b304d4ae568d6f4 (diff) | |
Fix wait condition for SetRequestedOrientationWhilePinnedTest
The setup waited for a ROTATION_0, but this test starts at ROTATION_90
Bug: 219773854
Bug: 220977327
Test: atest WMShellFlickerTests:SetRequestedOrientationWhilePinnedTest
Change-Id: Ib2bde1f66f248adbe69acf5c344322e32b364eb2
Diffstat (limited to 'libs/WindowManager/Shell')
| -rw-r--r-- | libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt index 159caee506f0..f7384e742a04 100644 --- a/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt +++ b/libs/WindowManager/Shell/tests/flicker/src/com/android/wm/shell/flicker/pip/SetRequestedOrientationWhilePinnedTest.kt @@ -25,8 +25,11 @@ import com.android.server.wm.flicker.FlickerTestParameter import com.android.server.wm.flicker.FlickerTestParameterFactory import com.android.server.wm.flicker.annotation.Group4 import com.android.server.wm.flicker.dsl.FlickerBuilder +import com.android.server.wm.flicker.helpers.setRotation +import com.android.server.wm.flicker.helpers.wakeUpAndGoToHomeScreen import com.android.server.wm.flicker.helpers.WindowUtils import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled +import com.android.server.wm.flicker.rules.RemoveAllTasksButHomeRule.Companion.removeAllTasksButHome import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE import com.android.wm.shell.flicker.testapp.Components import com.android.wm.shell.flicker.testapp.Components.FixedActivity.EXTRA_FIXED_ORIENTATION @@ -61,9 +64,11 @@ open class SetRequestedOrientationWhilePinnedTest( override val transition: FlickerBuilder.() -> Unit get() = { - setupAndTeardown(this) - setup { + test { + removeAllTasksButHome() + device.wakeUpAndGoToHomeScreen() + } eachRun { // Launch the PiP activity fixed as landscape. pipApp.launchViaIntent(wmHelper, stringExtras = mapOf( @@ -80,6 +85,10 @@ open class SetRequestedOrientationWhilePinnedTest( teardown { eachRun { pipApp.exit(wmHelper) + setRotation(Surface.ROTATION_0) + } + test { + removeAllTasksButHome() } } transitions { |