Merge "Disable flaky tests"
This commit is contained in:
committed by
Android (Google) Code Review
commit
d25198a25e
@@ -28,6 +28,9 @@ import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.Test
|
||||
import org.junit.runners.Parameterized
|
||||
@@ -44,11 +47,16 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
class DismissBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
open class DismissBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
|
||||
private val wm = context.getSystemService(Context.WINDOW_SERVICE) as WindowManager
|
||||
private val displaySize = DisplayMetrics()
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = buildTransition {
|
||||
setup {
|
||||
@@ -68,7 +76,7 @@ class DismissBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(tes
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
fun testAppIsAlwaysVisible() {
|
||||
open fun testAppIsAlwaysVisible() {
|
||||
testSpec.assertLayers {
|
||||
this.isVisible(testApp.component)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.bubble
|
||||
|
||||
import androidx.test.filters.FlakyTest
|
||||
import androidx.test.filters.RequiresDevice
|
||||
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
@FlakyTest(bugId = 217777115)
|
||||
class DismissBubbleScreenShellTransit(
|
||||
testSpec: FlickerTestParameter
|
||||
) : DismissBubbleScreen(testSpec) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,9 @@ import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.Test
|
||||
import org.junit.runners.Parameterized
|
||||
@@ -42,7 +45,12 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
class ExpandBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
open class ExpandBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = buildTransition {
|
||||
@@ -61,7 +69,7 @@ class ExpandBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(test
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
fun testAppIsAlwaysVisible() {
|
||||
open fun testAppIsAlwaysVisible() {
|
||||
testSpec.assertLayers {
|
||||
this.isVisible(testApp.component)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.bubble
|
||||
|
||||
import androidx.test.filters.FlakyTest
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
@FlakyTest(bugId = 217777115)
|
||||
class ExpandBubbleScreenShellTransit(
|
||||
testSpec: FlickerTestParameter
|
||||
) : ExpandBubbleScreen(testSpec) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,9 @@ import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.Test
|
||||
import org.junit.runners.Parameterized
|
||||
@@ -39,7 +42,12 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
class LaunchBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
open class LaunchBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = buildTransition {
|
||||
@@ -51,7 +59,7 @@ class LaunchBubbleScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(test
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
fun testAppIsAlwaysVisible() {
|
||||
open fun testAppIsAlwaysVisible() {
|
||||
testSpec.assertLayers {
|
||||
this.isVisible(testApp.component)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.bubble
|
||||
|
||||
import androidx.test.filters.FlakyTest
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
@FlakyTest(bugId = 217777115)
|
||||
class LaunchBubbleScreenShellTransit(
|
||||
testSpec: FlickerTestParameter
|
||||
) : LaunchBubbleScreen(testSpec) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
}
|
||||
}
|
||||
@@ -25,6 +25,9 @@ import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.Test
|
||||
import org.junit.runners.Parameterized
|
||||
@@ -41,7 +44,12 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
class MultiBubblesScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
open class MultiBubblesScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(testSpec) {
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = buildTransition {
|
||||
@@ -69,7 +77,7 @@ class MultiBubblesScreen(testSpec: FlickerTestParameter) : BaseBubbleScreen(test
|
||||
|
||||
@Presubmit
|
||||
@Test
|
||||
fun testAppIsAlwaysVisible() {
|
||||
open fun testAppIsAlwaysVisible() {
|
||||
testSpec.assertLayers {
|
||||
this.isVisible(testApp.component)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.bubble
|
||||
|
||||
import androidx.test.filters.FlakyTest
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@Group4
|
||||
@FlakyTest(bugId = 217777115)
|
||||
class MultiBubblesScreenShellTransit(
|
||||
testSpec: FlickerTestParameter
|
||||
) : MultiBubblesScreen(testSpec) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
}
|
||||
}
|
||||
@@ -31,7 +31,7 @@ import com.android.server.wm.flicker.helpers.setRotation
|
||||
import com.android.server.wm.traces.common.FlickerComponentName
|
||||
import com.android.wm.shell.flicker.helpers.ImeAppHelper
|
||||
import org.junit.Assume.assumeFalse
|
||||
import org.junit.Assume.assumeTrue
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -47,9 +47,14 @@ import org.junit.runners.Parameterized
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group4
|
||||
class PipKeyboardTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) {
|
||||
open class PipKeyboardTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) {
|
||||
private val imeApp = ImeAppHelper(instrumentation)
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = buildTransition(eachRun = false) {
|
||||
setup {
|
||||
@@ -77,25 +82,14 @@ class PipKeyboardTest(testSpec: FlickerTestParameter) : PipTransition(testSpec)
|
||||
/** {@inheritDoc} */
|
||||
@FlakyTest(bugId = 206753786)
|
||||
@Test
|
||||
override fun statusBarLayerRotatesScales() {
|
||||
// This test doesn't work in shell transitions because of b/206753786
|
||||
assumeFalse(isShellTransitionsEnabled)
|
||||
super.statusBarLayerRotatesScales()
|
||||
}
|
||||
|
||||
@FlakyTest(bugId = 214452854)
|
||||
@Test
|
||||
fun statusBarLayerRotatesScales_shellTransit() {
|
||||
assumeTrue(isShellTransitionsEnabled)
|
||||
super.statusBarLayerRotatesScales()
|
||||
}
|
||||
override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales()
|
||||
|
||||
/**
|
||||
* Ensure the pip window remains visible throughout any keyboard interactions
|
||||
*/
|
||||
@Presubmit
|
||||
@Test
|
||||
fun pipInVisibleBounds() {
|
||||
open fun pipInVisibleBounds() {
|
||||
testSpec.assertWmVisibleRegion(pipApp.component) {
|
||||
val displayBounds = WindowUtils.getDisplayBounds(testSpec.startRotation)
|
||||
coversAtMost(displayBounds)
|
||||
@@ -107,7 +101,7 @@ class PipKeyboardTest(testSpec: FlickerTestParameter) : PipTransition(testSpec)
|
||||
*/
|
||||
@Presubmit
|
||||
@Test
|
||||
fun pipIsAboveAppWindow() {
|
||||
open fun pipIsAboveAppWindow() {
|
||||
testSpec.assertWmTag(TAG_IME_VISIBLE) {
|
||||
isAboveWindow(FlickerComponentName.IME, pipApp.component)
|
||||
}
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.pip
|
||||
|
||||
import androidx.test.filters.FlakyTest
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group4
|
||||
@FlakyTest(bugId = 217777115)
|
||||
class PipKeyboardTestShellTransit(testSpec: FlickerTestParameter) : PipKeyboardTest(testSpec) {
|
||||
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
@FlakyTest(bugId = 214452854)
|
||||
@Test
|
||||
override fun statusBarLayerRotatesScales() = super.statusBarLayerRotatesScales()
|
||||
}
|
||||
@@ -27,10 +27,13 @@ import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.entireScreenCovered
|
||||
import com.android.server.wm.flicker.helpers.WindowUtils
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.helpers.setRotation
|
||||
import com.android.server.wm.flicker.navBarLayerRotatesAndScales
|
||||
import com.android.server.wm.flicker.statusBarLayerRotatesScales
|
||||
import com.android.wm.shell.flicker.helpers.FixedAppHelper
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -61,11 +64,16 @@ import org.junit.runners.Parameterized
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group4
|
||||
class PipRotationTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) {
|
||||
open class PipRotationTest(testSpec: FlickerTestParameter) : PipTransition(testSpec) {
|
||||
private val fixedApp = FixedAppHelper(instrumentation)
|
||||
private val screenBoundsStart = WindowUtils.getDisplayBounds(testSpec.startRotation)
|
||||
private val screenBoundsEnd = WindowUtils.getDisplayBounds(testSpec.endRotation)
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = buildTransition(eachRun = false) {
|
||||
setup {
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.pip
|
||||
|
||||
import androidx.test.filters.FlakyTest
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group4
|
||||
@FlakyTest(bugId = 217777115)
|
||||
class PipRotationTestShellTransit(testSpec: FlickerTestParameter) : PipRotationTest(testSpec) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,12 @@ 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.WindowUtils
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.wm.shell.flicker.pip.PipTransition.BroadcastActionTrigger.Companion.ORIENTATION_LANDSCAPE
|
||||
import com.android.wm.shell.flicker.testapp.Components.FixedActivity.EXTRA_FIXED_ORIENTATION
|
||||
import com.android.wm.shell.flicker.testapp.Components.PipActivity.EXTRA_ENTER_PIP
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
@@ -44,12 +47,17 @@ import org.junit.runners.Parameterized
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group4
|
||||
class SetRequestedOrientationWhilePinnedTest(
|
||||
open class SetRequestedOrientationWhilePinnedTest(
|
||||
testSpec: FlickerTestParameter
|
||||
) : PipTransition(testSpec) {
|
||||
private val startingBounds = WindowUtils.getDisplayBounds(Surface.ROTATION_0)
|
||||
private val endingBounds = WindowUtils.getDisplayBounds(Surface.ROTATION_90)
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
}
|
||||
|
||||
override val transition: FlickerBuilder.() -> Unit
|
||||
get() = {
|
||||
setupAndTeardown(this)
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (C) 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.wm.shell.flicker.pip
|
||||
|
||||
import androidx.test.filters.FlakyTest
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTestParameter
|
||||
import com.android.server.wm.flicker.annotation.Group4
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import org.junit.Assume
|
||||
import org.junit.Before
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Group4
|
||||
@FlakyTest(bugId = 217777115)
|
||||
class SetRequestedOrientationWhilePinnedTestShellTransit(
|
||||
testSpec: FlickerTestParameter
|
||||
) : SetRequestedOrientationWhilePinnedTest(testSpec) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ class OpenAppFromOverviewTest(testSpec: FlickerTestParameter)
|
||||
override fun appLayerBecomesVisible() = super.appLayerBecomesVisible_warmStart()
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Presubmit
|
||||
@FlakyTest(bugId = 218624176)
|
||||
@Test
|
||||
override fun appWindowBecomesVisible() = super.appWindowBecomesVisible_warmStart()
|
||||
|
||||
@@ -149,6 +149,22 @@ class OpenAppFromOverviewTest(testSpec: FlickerTestParameter)
|
||||
super.appWindowReplacesLauncherAsTopWindow()
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Presubmit
|
||||
@Test
|
||||
override fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
|
||||
assumeFalse(isShellTransitionsEnabled)
|
||||
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@FlakyTest(bugId = 218470989)
|
||||
@Test
|
||||
fun visibleWindowsShownMoreThanOneConsecutiveEntry_shellTransit() {
|
||||
assumeTrue(isShellTransitionsEnabled)
|
||||
super.visibleWindowsShownMoreThanOneConsecutiveEntry()
|
||||
}
|
||||
|
||||
companion object {
|
||||
/**
|
||||
* Creates the test configurations.
|
||||
|
||||
@@ -25,11 +25,13 @@ import com.android.server.wm.flicker.FlickerTestParameterFactory
|
||||
import com.android.server.wm.flicker.annotation.Group3
|
||||
import com.android.server.wm.flicker.dsl.FlickerBuilder
|
||||
import com.android.server.wm.flicker.helpers.SimpleAppHelper
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.rules.WMFlickerServiceRuleForTestSpec
|
||||
import com.android.server.wm.flicker.statusBarLayerIsVisible
|
||||
import com.android.server.wm.flicker.statusBarLayerRotatesScales
|
||||
import com.android.server.wm.flicker.statusBarWindowIsVisible
|
||||
import com.android.server.wm.traces.common.FlickerComponentName
|
||||
import org.junit.Assume
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
@@ -131,6 +133,7 @@ class ChangeAppRotationTest(
|
||||
@Presubmit
|
||||
@Test
|
||||
fun rotationLayerAppearsAndVanishes() {
|
||||
Assume.assumeFalse(isShellTransitionsEnabled)
|
||||
testSpec.assertLayers {
|
||||
this.isVisible(testApp.component)
|
||||
.then()
|
||||
@@ -141,6 +144,13 @@ class ChangeAppRotationTest(
|
||||
}
|
||||
}
|
||||
|
||||
@FlakyTest(bugId = 218484127)
|
||||
@Test
|
||||
fun rotationLayerAppearsAndVanishes_shellTransit() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
rotationLayerAppearsAndVanishes()
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks that the status bar window is visible and above the app windows in all WM
|
||||
* trace entries
|
||||
|
||||
Reference in New Issue
Block a user