Improve IME test naming
Previous names didn't clearly identify the test behavior Test: atest FlickerTests Bug: 265910451 Change-Id: I2062a1e2eaa25e875f3c79d21828421c78ad3e14
This commit is contained in:
@@ -31,7 +31,7 @@ import com.android.server.wm.traces.parser.toFlickerComponent
|
||||
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
|
||||
import java.util.regex.Pattern
|
||||
|
||||
class ImeAppAutoFocusHelper
|
||||
class ImeShownOnAppStartHelper
|
||||
@JvmOverloads
|
||||
constructor(
|
||||
instr: Instrumentation,
|
||||
@@ -121,11 +121,14 @@ constructor(
|
||||
}
|
||||
|
||||
fun toggleFixPortraitOrientation(wmHelper: WindowManagerStateHelper) {
|
||||
val button = uiDevice.wait(Until.findObject(By.res(getPackage(),
|
||||
"toggle_fixed_portrait_btn")), FIND_TIMEOUT)
|
||||
val button =
|
||||
uiDevice.wait(
|
||||
Until.findObject(By.res(getPackage(), "toggle_fixed_portrait_btn")),
|
||||
FIND_TIMEOUT
|
||||
)
|
||||
require(button != null) {
|
||||
"Button not found, this usually happens when the device " +
|
||||
"was left in an unknown state (e.g. Screen turned off)"
|
||||
"was left in an unknown state (e.g. Screen turned off)"
|
||||
}
|
||||
button.click()
|
||||
mInstrumentation.waitForIdleSync()
|
||||
@@ -294,10 +294,10 @@ open class PipAppHelper(instrumentation: Instrumentation) :
|
||||
.StateSyncBuilder()
|
||||
.add("pipWindowMinimized") {
|
||||
val pipAppWindow =
|
||||
it.wmState.visibleWindows.firstOrNull { window ->
|
||||
this.windowMatchesAnyOf(window)
|
||||
}
|
||||
?: return@add false
|
||||
it.wmState.visibleWindows.firstOrNull { window ->
|
||||
this.windowMatchesAnyOf(window)
|
||||
}
|
||||
?: return@add false
|
||||
val pipRegion = pipAppWindow.frameRegion
|
||||
return@add windowRect.coversMoreThan(pipRegion)
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class CloseImeEditorPopupDialogTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
class CloseImeOnDismissPopupDialogTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val imeTestApp = ImeEditorPopupDialogAppHelper(instrumentation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@@ -41,7 +41,7 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class CloseImeWindowToHomeTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
open class CloseImeOnGoHomeTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppHelper(instrumentation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@@ -26,4 +26,4 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class OpenImeWindowTestCfArm(flicker: FlickerTest) : OpenImeWindowTest(flicker)
|
||||
class CloseImeOnGoHomeTestCfArm(flicker: FlickerTest) : CloseImeOnGoHomeTest(flicker)
|
||||
@@ -22,7 +22,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.traces.common.ComponentNameMatcher
|
||||
import com.android.server.wm.traces.common.service.PlatformConsts
|
||||
@@ -48,8 +48,8 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class CloseImeAutoOpenWindowToHomeTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
open class CloseImeShownOnAppStartOnGoHomeTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
@@ -26,5 +26,5 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class OpenImeWindowFromFixedOrientationAppTestCfArm(flicker: FlickerTest) :
|
||||
OpenImeWindowFromFixedOrientationAppTest(flicker)
|
||||
open class CloseImeShownOnAppStartOnGoHomeTestCfArm(flicker: FlickerTest) :
|
||||
CloseImeShownOnAppStartOnGoHomeTest(flicker)
|
||||
@@ -22,7 +22,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.traces.common.ComponentNameMatcher
|
||||
import com.android.server.wm.traces.common.service.PlatformConsts
|
||||
@@ -48,8 +48,8 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class CloseImeAutoOpenWindowToAppTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
open class CloseImeShownOnAppStartToAppOnPressBackTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2023 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.server.wm.flicker.ime
|
||||
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class CloseImeShownOnAppStartToAppOnPressBackTestCfArm(flicker: FlickerTest) :
|
||||
CloseImeShownOnAppStartToAppOnPressBackTest(flicker)
|
||||
@@ -43,7 +43,7 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class CloseImeWindowToAppTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
open class CloseImeToAppOnPressBackTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppHelper(instrumentation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@@ -26,5 +26,5 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class LaunchAppShowImeOnStartTestCfArm(flicker: FlickerTest) :
|
||||
LaunchAppShowImeOnStartTest(flicker)
|
||||
class CloseImeToAppOnPressBackTestCfArm(flicker: FlickerTest) :
|
||||
CloseImeToAppOnPressBackTest(flicker)
|
||||
@@ -46,7 +46,7 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class OpenImeWindowAndCloseTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
open class CloseImeToHomeOnFinishActivityTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val simpleApp = SimpleAppHelper(instrumentation)
|
||||
private val testApp = ImeAppHelper(instrumentation)
|
||||
|
||||
@@ -26,4 +26,5 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class CloseImeWindowToHomeTestCfArm(flicker: FlickerTest) : CloseImeWindowToHomeTest(flicker)
|
||||
open class CloseImeToHomeOnFinishActivityTestCfArm(flicker: FlickerTest) :
|
||||
CloseImeToHomeOnFinishActivityTest(flicker)
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 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.server.wm.flicker.ime
|
||||
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class OpenImeWindowAndCloseTestCfArm(flicker: FlickerTest) :
|
||||
OpenImeWindowAndCloseTest(flicker)
|
||||
@@ -19,11 +19,11 @@ import android.platform.test.annotations.Postsubmit
|
||||
import androidx.test.filters.RequiresDevice
|
||||
import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.helpers.WindowUtils
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.traces.region.RegionSubject
|
||||
import com.android.server.wm.traces.common.ComponentNameMatcher
|
||||
import com.android.server.wm.traces.common.service.PlatformConsts
|
||||
@@ -34,15 +34,15 @@ import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
/**
|
||||
* Test IME window shown on the app with fixing portrait orientation.
|
||||
* To run this test: `atest FlickerTests:OpenImeWindowToFixedPortraitAppTest`
|
||||
* Test IME window shown on the app with fixing portrait orientation. To run this test: `atest
|
||||
* FlickerTests:OpenImeWindowToFixedPortraitAppTest`
|
||||
*/
|
||||
@RequiresDevice
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class OpenImeWindowToFixedPortraitAppTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
private val testApp = ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
@@ -52,9 +52,7 @@ class OpenImeWindowToFixedPortraitAppTest(flicker: FlickerTest) : BaseTest(flick
|
||||
// Enable letterbox when the app calls setRequestedOrientation
|
||||
device.executeShellCommand("cmd window set-ignore-orientation-request true")
|
||||
}
|
||||
transitions {
|
||||
testApp.toggleFixPortraitOrientation(wmHelper)
|
||||
}
|
||||
transitions { testApp.toggleFixPortraitOrientation(wmHelper) }
|
||||
teardown {
|
||||
testApp.exit()
|
||||
device.executeShellCommand("cmd window set-ignore-orientation-request false")
|
||||
@@ -64,17 +62,13 @@ class OpenImeWindowToFixedPortraitAppTest(flicker: FlickerTest) : BaseTest(flick
|
||||
@Postsubmit
|
||||
@Test
|
||||
fun imeLayerVisibleStart() {
|
||||
flicker.assertLayersStart {
|
||||
this.isVisible(ComponentNameMatcher.IME)
|
||||
}
|
||||
flicker.assertLayersStart { this.isVisible(ComponentNameMatcher.IME) }
|
||||
}
|
||||
|
||||
@Postsubmit
|
||||
@Test
|
||||
fun imeLayerExistsEnd() {
|
||||
flicker.assertLayersEnd {
|
||||
this.isVisible(ComponentNameMatcher.IME)
|
||||
}
|
||||
flicker.assertLayersEnd { this.isVisible(ComponentNameMatcher.IME) }
|
||||
}
|
||||
|
||||
@Postsubmit
|
||||
@@ -86,7 +80,7 @@ class OpenImeWindowToFixedPortraitAppTest(flicker: FlickerTest) : BaseTest(flick
|
||||
}
|
||||
flicker.assertLayersEnd {
|
||||
this.visibleRegion(ComponentNameMatcher.IME)
|
||||
.coversExactly(imeLayerVisibleRegionBeforeTransition!!.region)
|
||||
.coversExactly(imeLayerVisibleRegionBeforeTransition!!.region)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +90,7 @@ class OpenImeWindowToFixedPortraitAppTest(flicker: FlickerTest) : BaseTest(flick
|
||||
val displayBounds = WindowUtils.getDisplayBounds(flicker.scenario.startRotation)
|
||||
flicker.assertLayersEnd {
|
||||
this.visibleRegion(testApp.or(ComponentNameMatcher.LETTERBOX))
|
||||
.coversExactly(displayBounds)
|
||||
.coversExactly(displayBounds)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,14 +105,13 @@ class OpenImeWindowToFixedPortraitAppTest(flicker: FlickerTest) : BaseTest(flick
|
||||
@JvmStatic
|
||||
fun getParams(): Collection<FlickerTest> {
|
||||
return FlickerTestFactory.nonRotationTests(
|
||||
supportedRotations = listOf(
|
||||
PlatformConsts.Rotation.ROTATION_90,
|
||||
),
|
||||
supportedNavigationModes = listOf(
|
||||
PlatformConsts.NavBar.MODE_3BUTTON,
|
||||
PlatformConsts.NavBar.MODE_GESTURAL
|
||||
)
|
||||
)
|
||||
supportedRotations =
|
||||
listOf(
|
||||
PlatformConsts.Rotation.ROTATION_90,
|
||||
),
|
||||
supportedNavigationModes =
|
||||
listOf(PlatformConsts.NavBar.MODE_3BUTTON, PlatformConsts.NavBar.MODE_GESTURAL)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 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.server.wm.flicker.ime
|
||||
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class OpenImeWindowToOverViewTestCfArm(flicker: FlickerTest) : OpenImeWindowToOverViewTest(flicker)
|
||||
@@ -23,7 +23,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.helpers.setRotation
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
@@ -45,8 +45,10 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class OpenImeWindowFromFixedOrientationAppTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val imeTestApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
open class ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTest(flicker: FlickerTest) :
|
||||
BaseTest(flicker) {
|
||||
private val imeTestApp =
|
||||
ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2023 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.server.wm.flicker.ime
|
||||
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import org.junit.FixMethodOrder
|
||||
import org.junit.runner.RunWith
|
||||
import org.junit.runners.MethodSorters
|
||||
import org.junit.runners.Parameterized
|
||||
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTestCfArm(flicker: FlickerTest) :
|
||||
ShowImeOnAppStartWhenLaunchingAppFromFixedOrientationTest(flicker)
|
||||
@@ -22,7 +22,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.helpers.reopenAppFromOverview
|
||||
import com.android.server.wm.flicker.helpers.setRotation
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
@@ -41,8 +41,9 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class ReOpenImeWindowTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
open class ShowImeOnAppStartWhenLaunchingAppFromOverviewTest(flicker: FlickerTest) :
|
||||
BaseTest(flicker) {
|
||||
private val testApp = ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
@@ -23,7 +23,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.helpers.SimpleAppHelper
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.helpers.setRotation
|
||||
@@ -47,9 +47,11 @@ import org.junit.runners.Parameterized
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Presubmit
|
||||
open class SwitchImeWindowsFromGestureNavTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
open class ShowImeOnAppStartWhenLaunchingAppFromQuickSwitchTest(flicker: FlickerTest) :
|
||||
BaseTest(flicker) {
|
||||
private val testApp = SimpleAppHelper(instrumentation)
|
||||
private val imeTestApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
private val imeTestApp =
|
||||
ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
@Before
|
||||
open fun before() {
|
||||
@@ -28,5 +28,5 @@ import org.junit.runners.Parameterized
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
@Presubmit
|
||||
open class SwitchImeWindowsFromGestureNavTestCfArm(flicker: FlickerTest) :
|
||||
SwitchImeWindowsFromGestureNavTest(flicker)
|
||||
open class ShowImeOnAppStartWhenLaunchingAppFromQuickSwitchTestCfArm(flicker: FlickerTest) :
|
||||
ShowImeOnAppStartWhenLaunchingAppFromQuickSwitchTest(flicker)
|
||||
@@ -38,8 +38,8 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class SwitchImeWindowsFromGestureNavTest_ShellTransit(flicker: FlickerTest) :
|
||||
SwitchImeWindowsFromGestureNavTest(flicker) {
|
||||
class ShowImeOnAppStartWhenLaunchingAppFromQuickSwitchTestShellTransit(flicker: FlickerTest) :
|
||||
ShowImeOnAppStartWhenLaunchingAppFromQuickSwitchTest(flicker) {
|
||||
@Before
|
||||
override fun before() {
|
||||
Assume.assumeTrue(isShellTransitionsEnabled)
|
||||
@@ -22,7 +22,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeStateInitializeHelper
|
||||
import com.android.server.wm.flicker.helpers.setRotation
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
@@ -72,8 +72,8 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class LaunchAppShowImeOnStartTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
open class ShowImeOnAppStartWhenLaunchingAppTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
private val initializeApp = ImeStateInitializeHelper(instrumentation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@@ -26,5 +26,5 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class CloseImeAutoOpenWindowToAppTestCfArm(flicker: FlickerTest) :
|
||||
CloseImeAutoOpenWindowToAppTest(flicker)
|
||||
class ShowImeOnStartWhenLaunchingAppCfArmTest(flicker: FlickerTest) :
|
||||
ShowImeOnAppStartWhenLaunchingAppTest(flicker)
|
||||
@@ -37,7 +37,7 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class OpenImeWindowTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
open class ShowImeWhenFocusingOnInputFieldTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppHelper(instrumentation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@@ -26,5 +26,5 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class CloseImeAutoOpenWindowToHomeTestCfArm(flicker: FlickerTest) :
|
||||
CloseImeAutoOpenWindowToHomeTest(flicker)
|
||||
class ShowImeWhenFocusingOnInputFieldTestCfArm(flicker: FlickerTest) :
|
||||
ShowImeWhenFocusingOnInputFieldTest(flicker)
|
||||
@@ -25,7 +25,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.traces.common.ComponentNameMatcher
|
||||
import com.android.server.wm.traces.common.service.PlatformConsts
|
||||
@@ -45,8 +45,8 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class LaunchAppShowImeAndDialogThemeAppTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
class ShowImeWhileDismissingThemedPopupDialogTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val testApp = ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
@@ -22,7 +22,7 @@ import com.android.server.wm.flicker.BaseTest
|
||||
import com.android.server.wm.flicker.FlickerBuilder
|
||||
import com.android.server.wm.flicker.FlickerTest
|
||||
import com.android.server.wm.flicker.FlickerTestFactory
|
||||
import com.android.server.wm.flicker.helpers.ImeAppAutoFocusHelper
|
||||
import com.android.server.wm.flicker.helpers.ImeShownOnAppStartHelper
|
||||
import com.android.server.wm.flicker.helpers.isShellTransitionsEnabled
|
||||
import com.android.server.wm.flicker.junit.FlickerParametersRunnerFactory
|
||||
import com.android.server.wm.flicker.navBarLayerIsVisibleAtStartAndEnd
|
||||
@@ -46,8 +46,9 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
open class OpenImeWindowToOverViewTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val imeTestApp = ImeAppAutoFocusHelper(instrumentation, flicker.scenario.startRotation)
|
||||
open class ShowImeWhileEnteringOverviewTest(flicker: FlickerTest) : BaseTest(flicker) {
|
||||
private val imeTestApp =
|
||||
ImeShownOnAppStartHelper(instrumentation, flicker.scenario.startRotation)
|
||||
|
||||
/** {@inheritDoc} */
|
||||
override val transition: FlickerBuilder.() -> Unit = {
|
||||
@@ -26,4 +26,5 @@ import org.junit.runners.Parameterized
|
||||
@RunWith(Parameterized::class)
|
||||
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
class CloseImeWindowToAppTestCfArm(flicker: FlickerTest) : CloseImeWindowToAppTest(flicker)
|
||||
class ShowImeWhileEnteringOverviewTestCfArm(flicker: FlickerTest) :
|
||||
ShowImeWhileEnteringOverviewTest(flicker)
|
||||
Reference in New Issue
Block a user