Fix ExitPipWithDismissButtonTest#focusDoesNotChange

The transition is to click on the pip menu, then click on the dismiss
button. This will cause the focus change.

Fix: 215869110
Fix: 216306753
Test: atest WMShellFlickerTests:ExitPipWithDismissButtonTest
Change-Id: I50dab84f588c3bedaa7d65c02144054d4eefdcd5
This commit is contained in:
Chris Li
2022-02-21 12:49:29 +08:00
parent 9ab79ba40f
commit 02c59f009b
3 changed files with 23 additions and 14 deletions

View File

@@ -93,15 +93,4 @@ abstract class ExitPipTransition(testSpec: FlickerTestParameter) : PipTransition
.isVisible(LAUNCHER_COMPONENT) .isVisible(LAUNCHER_COMPONENT)
} }
} }
/**
* Checks that the focus doesn't change between windows during the transition
*/
@Presubmit
@Test
open fun focusDoesNotChange() {
testSpec.assertEventLog {
this.focusDoesNotChange()
}
}
} }

View File

@@ -16,6 +16,7 @@
package com.android.wm.shell.flicker.pip package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
import android.view.Surface import android.view.Surface
import androidx.test.filters.FlakyTest import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice import androidx.test.filters.RequiresDevice
@@ -72,10 +73,17 @@ class ExitPipWithDismissButtonTest(testSpec: FlickerTestParameter) : ExitPipTran
@Test @Test
override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales() override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales()
/** {@inheritDoc} */ /**
@FlakyTest(bugId = 215869110) * Checks that the focus changes between the pip menu window and the launcher when clicking the
* dismiss button on pip menu to close the pip window.
*/
@Presubmit
@Test @Test
override fun focusDoesNotChange() = super.focusDoesNotChange() fun focusDoesNotChange() {
testSpec.assertEventLog {
this.focusChanges("PipMenuView", "NexusLauncherActivity")
}
}
companion object { companion object {
/** /**

View File

@@ -16,6 +16,7 @@
package com.android.wm.shell.flicker.pip package com.android.wm.shell.flicker.pip
import android.platform.test.annotations.Presubmit
import android.view.Surface import android.view.Surface
import androidx.test.filters.FlakyTest import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice import androidx.test.filters.RequiresDevice
@@ -81,6 +82,17 @@ class ExitPipWithSwipeDownTest(testSpec: FlickerTestParameter) : ExitPipTransiti
@Test @Test
override fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales() override fun statusBarLayerRotatesScales() = testSpec.statusBarLayerRotatesScales()
/**
* Checks that the focus doesn't change between windows during the transition
*/
@Presubmit
@Test
fun focusDoesNotChange() {
testSpec.assertEventLog {
this.focusDoesNotChange()
}
}
companion object { companion object {
/** /**
* Creates the test configurations. * Creates the test configurations.