Always run TV PiP tests with 0 rotation
Bug: 13054136 Test: atest WMShellFlickerTests:TvPipMenuTests Test: atest WMShellFlickerTests:TvPipNotificationTests Change-Id: Ied62beb0c8551c8a0572455bd790c11c5517f61d
This commit is contained in:
@@ -23,17 +23,13 @@ import com.android.wm.shell.flicker.wait
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
/**
|
||||
* Test Pip Menu on TV.
|
||||
* To run this test: `atest WMShellFlickerTests:TvPipMenuTests`
|
||||
*/
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
class TvPipMenuTests(rotationName: String, rotation: Int)
|
||||
: TvPipTestBase(rotationName, rotation) {
|
||||
class TvPipMenuTests : TvPipTestBase() {
|
||||
|
||||
private val systemUiResources =
|
||||
packageManager.getResourcesForApplication(SYSTEM_UI_PACKAGE_NAME)
|
||||
@@ -144,10 +140,4 @@ class TvPipMenuTests(rotationName: String, rotation: Int)
|
||||
uiDevice.pressWindowKey()
|
||||
return uiDevice.waitForTvPipMenu() ?: fail("Pip menu should have been shown")
|
||||
}
|
||||
|
||||
companion object {
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getParams(): Collection<Array<Any>> = rotationParams
|
||||
}
|
||||
}
|
||||
@@ -32,18 +32,13 @@ import org.junit.Assert.assertNull
|
||||
import org.junit.Assert.assertTrue
|
||||
import org.junit.Before
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
/**
|
||||
* Test Pip Notifications on TV.
|
||||
* To run this test: `atest WMShellFlickerTests:TvPipNotificationTests`
|
||||
*/
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
class TvPipNotificationTests(rotationName: String, rotation: Int)
|
||||
: TvPipTestBase(rotationName, rotation) {
|
||||
|
||||
class TvPipNotificationTests : TvPipTestBase() {
|
||||
@Before
|
||||
override fun setUp() {
|
||||
super.setUp()
|
||||
@@ -154,10 +149,6 @@ class TvPipNotificationTests(rotationName: String, rotation: Int)
|
||||
companion object {
|
||||
private const val TITLE_MEDIA_SESSION_PLAYING = "TestApp media is playing"
|
||||
private const val TITLE_MEDIA_SESSION_PAUSED = "TestApp media is paused"
|
||||
|
||||
@Parameterized.Parameters(name = "{0}")
|
||||
@JvmStatic
|
||||
fun getParams(): Collection<Array<Any>> = rotationParams
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -32,8 +32,7 @@ import org.junit.Assert.assertFalse
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
|
||||
abstract class TvPipTestBase(rotationName: String, rotation: Int)
|
||||
: PipTestBase(rotationName, rotation) {
|
||||
abstract class TvPipTestBase : PipTestBase(rotationToString(ROTATION_0), ROTATION_0) {
|
||||
|
||||
private val isTelevision: Boolean
|
||||
get() = packageManager.run {
|
||||
@@ -93,9 +92,5 @@ abstract class TvPipTestBase(rotationName: String, rotation: Int)
|
||||
|
||||
companion object {
|
||||
private const val AFTER_TEXT_PROCESS_CHECK_DELAY = 1_000L // 1 sec
|
||||
|
||||
@JvmStatic
|
||||
protected val rotationParams: Collection<Array<Any>> =
|
||||
listOf(arrayOf(rotationToString(ROTATION_0), ROTATION_0))
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user