Merge "Add default assertions on activity embedding test"
This commit is contained in:
committed by
Android (Google) Code Review
commit
e1406a81ed
@@ -16,13 +16,12 @@
|
||||
|
||||
package com.android.server.wm.flicker.activityembedding
|
||||
|
||||
import android.app.Instrumentation
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.helpers.ActivityEmbeddingAppHelper
|
||||
import org.junit.Before
|
||||
|
||||
abstract class ActivityEmbeddingTestBase {
|
||||
val instrumentation: Instrumentation = InstrumentationRegistry.getInstrumentation()
|
||||
abstract class ActivityEmbeddingTestBase(testSpec: FlickerTestParameter) : BaseTest(testSpec) {
|
||||
val testApp = ActivityEmbeddingAppHelper(instrumentation)
|
||||
|
||||
@Before
|
||||
|
||||
@@ -16,11 +16,11 @@
|
||||
|
||||
package com.android.server.wm.flicker.activityembedding
|
||||
|
||||
import android.platform.test.annotations.Postsubmit
|
||||
import android.platform.test.annotations.Presubmit
|
||||
import android.view.Surface
|
||||
import android.view.WindowManagerPolicyConstants
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerBuilderProvider
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.FlickerTestParameterFactory
|
||||
@@ -42,25 +42,24 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class OpenActivityEmbeddingPlaceholderSplit(private val testSpec: FlickerTestParameter) :
|
||||
ActivityEmbeddingTestBase() {
|
||||
class OpenActivityEmbeddingPlaceholderSplit(
|
||||
testSpec: FlickerTestParameter
|
||||
) : ActivityEmbeddingTestBase(testSpec) {
|
||||
|
||||
@FlickerBuilderProvider
|
||||
fun buildFlicker(): FlickerBuilder {
|
||||
return FlickerBuilder(instrumentation).apply {
|
||||
setup {
|
||||
eachRun {
|
||||
testApp.launchViaIntent(wmHelper)
|
||||
}
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
setup {
|
||||
eachRun {
|
||||
testApp.launchViaIntent(wmHelper)
|
||||
}
|
||||
transitions {
|
||||
testApp.launchPlaceholderSplit(wmHelper)
|
||||
}
|
||||
teardown {
|
||||
test {
|
||||
device.pressHome()
|
||||
testApp.exit(wmHelper)
|
||||
}
|
||||
}
|
||||
transitions {
|
||||
testApp.launchPlaceholderSplit(wmHelper)
|
||||
}
|
||||
teardown {
|
||||
test {
|
||||
device.pressHome()
|
||||
testApp.exit(wmHelper)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -90,6 +89,66 @@ class OpenActivityEmbeddingPlaceholderSplit(private val testSpec: FlickerTestPar
|
||||
}
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun entireScreenCovered() = super.entireScreenCovered()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun navBarLayerPositionAtStartAndEnd() = super.navBarLayerPositionAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun navBarWindowIsAlwaysVisible() = super.navBarWindowIsAlwaysVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun navBarLayerIsVisibleAtStartAndEnd() = super.navBarLayerIsVisibleAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun taskBarWindowIsAlwaysVisible() = super.taskBarWindowIsAlwaysVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun taskBarLayerIsVisibleAtStartAndEnd() = super.taskBarLayerIsVisibleAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun statusBarLayerIsVisibleAtStartAndEnd() =
|
||||
super.statusBarLayerIsVisibleAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun statusBarLayerPositionAtStartAndEnd() =
|
||||
super.statusBarLayerPositionAtStartAndEnd()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun statusBarWindowIsAlwaysVisible() =
|
||||
super.statusBarWindowIsAlwaysVisible()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() =
|
||||
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Postsubmit
|
||||
@Test
|
||||
override fun visibleLayersShownMoreThanOneConsecutiveEntry() =
|
||||
super.visibleLayersShownMoreThanOneConsecutiveEntry()
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Creates the test configurations.
|
||||
|
||||
Reference in New Issue
Block a user