Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dc61a79f authored by Nataniel Borges's avatar Nataniel Borges
Browse files

Format code according to linter rules after moving it into different packages

Bug: 307885357
Test: atest WMShellFlickerTestsPip1 WMShellFlickerTestsPip2 WMShellFlickerTestsSplitScreenGroup1 WMShellFlickerTestsSplitScreenGroup2 WMShellFlickerTestsService WMShellFlickerTestsBubbles WMShellFlickerTestsPlatinum
Change-Id: If0ad19b78872e0e7152c3a71736820276446be60
parent 7fcaee1a
Loading
Loading
Loading
Loading
+25 −34
Original line number Diff line number Diff line
@@ -65,10 +65,12 @@ import org.junit.runners.Parameterized
@Parameterized.UseParametersRunnerFactory(FlickerParametersRunnerFactory::class)
class RotateImmersiveAppInFullscreenTest(flicker: LegacyFlickerTest) : BaseAppCompat(flicker) {

    private val immersiveApp = LetterboxAppHelper(instrumentation,
    private val immersiveApp =
        LetterboxAppHelper(
            instrumentation,
            launcherName = ActivityOptions.PortraitImmersiveActivity.LABEL,
            component =
            ActivityOptions.PortraitImmersiveActivity.COMPONENT.toFlickerComponent())
            component = ActivityOptions.PortraitImmersiveActivity.COMPONENT.toFlickerComponent()
        )

    private val cmdHelper: CommandsHelper = CommandsHelper.getInstance(instrumentation)
    private val execAdb: (String) -> String = { cmd -> cmdHelper.executeShellCommand(cmd) }
@@ -99,9 +101,7 @@ class RotateImmersiveAppInFullscreenTest(flicker: LegacyFlickerTest) : BaseAppCo
                        ?: error("rotation button not found")
                }
            }
            teardown {
                immersiveApp.exit(wmHelper)
            }
            teardown { immersiveApp.exit(wmHelper) }
        }

    @Before
@@ -112,48 +112,40 @@ class RotateImmersiveAppInFullscreenTest(flicker: LegacyFlickerTest) : BaseAppCo
    /** {@inheritDoc} */
    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun taskBarLayerIsVisibleAtStartAndEnd() {
    }
    override fun taskBarLayerIsVisibleAtStartAndEnd() {}

    /** {@inheritDoc} */
    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun navBarLayerIsVisibleAtStartAndEnd() {
    }
    override fun navBarLayerIsVisibleAtStartAndEnd() {}

    /** {@inheritDoc} */
    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun statusBarLayerIsVisibleAtStartAndEnd() {
    }
    override fun statusBarLayerIsVisibleAtStartAndEnd() {}

    /** {@inheritDoc} */
    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun taskBarWindowIsAlwaysVisible() {
    }
    override fun taskBarWindowIsAlwaysVisible() {}

    /** {@inheritDoc} */
    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun navBarWindowIsAlwaysVisible() {
    }
    override fun navBarWindowIsAlwaysVisible() {}

    /** {@inheritDoc} */
    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun statusBarWindowIsAlwaysVisible() {
    }
    override fun statusBarWindowIsAlwaysVisible() {}

    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun statusBarLayerPositionAtStartAndEnd() {
    }
    override fun statusBarLayerPositionAtStartAndEnd() {}

    @Test
    @Ignore("Not applicable to this CUJ. App is in immersive mode.")
    override fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
    }
    override fun visibleWindowsShownMoreThanOneConsecutiveEntry() {}

    /** Test that app is fullscreen by checking status bar and task bar visibility. */
    @Postsubmit
@@ -162,7 +154,8 @@ class RotateImmersiveAppInFullscreenTest(flicker: LegacyFlickerTest) : BaseAppCo
        flicker.assertWmEnd {
            this.isAppWindowInvisible(ComponentNameMatcher.STATUS_BAR)
                .isAppWindowInvisible(ComponentNameMatcher.TASK_BAR)
                    .visibleRegion(immersiveApp).coversExactly(startDisplayBounds)
                .visibleRegion(immersiveApp)
                .coversExactly(startDisplayBounds)
        }
    }

@@ -170,9 +163,7 @@ class RotateImmersiveAppInFullscreenTest(flicker: LegacyFlickerTest) : BaseAppCo
    @Postsubmit
    @Test
    fun appInOriginalRotation() {
        flicker.assertWmEnd {
            this.hasRotation(Rotation.ROTATION_90)
        }
        flicker.assertWmEnd { this.hasRotation(Rotation.ROTATION_90) }
    }

    companion object {
@@ -190,9 +181,9 @@ class RotateImmersiveAppInFullscreenTest(flicker: LegacyFlickerTest) : BaseAppCo
        fun getParams(): Collection<FlickerTest> {
            return LegacyFlickerTestFactory.nonRotationTests(
                supportedRotations = listOf(Rotation.ROTATION_90),
                    // TODO(b/292403378): 3 button mode not added as rotation button is hidden in taskbar
                // TODO(b/292403378): 3 button mode not added as rotation button is hidden in
                // taskbar
                supportedNavigationModes = listOf(NavBar.MODE_GESTURAL)

            )
        }
    }
+6 −4
Original line number Diff line number Diff line
@@ -59,7 +59,8 @@ abstract class BaseBubbleScreen(flicker: LegacyFlickerTest) : BaseTest(flicker)
            setup {
                MultiWindowUtils.executeShellCommand(
                    instrumentation,
                        "settings put secure force_hide_bubbles_user_education 1")
                    "settings put secure force_hide_bubbles_user_education 1"
                )
                notifyManager.setBubblesAllowed(
                    testApp.packageName,
                    uid,
@@ -73,7 +74,8 @@ abstract class BaseBubbleScreen(flicker: LegacyFlickerTest) : BaseTest(flicker)
            teardown {
                MultiWindowUtils.executeShellCommand(
                    instrumentation,
                        "settings put secure force_hide_bubbles_user_education 0")
                    "settings put secure force_hide_bubbles_user_education 0"
                )
                notifyManager.setBubblesAllowed(
                    testApp.packageName,
                    uid,
+8 −5
Original line number Diff line number Diff line
@@ -81,8 +81,13 @@ class AutoEnterPipFromSplitScreenOnGoToHomeTest(flicker: LegacyFlickerTest) :
                pipApp.launchViaIntent(wmHelper)
                tapl.goHome()
                SplitScreenUtils.enterSplit(
                    wmHelper, tapl, device, pipApp, secondAppForSplitScreen,
                    flicker.scenario.startRotation)
                    wmHelper,
                    tapl,
                    device,
                    pipApp,
                    secondAppForSplitScreen,
                    flicker.scenario.startRotation
                )
                pipApp.enableAutoEnterForPipActivity()
            }
            teardown {
@@ -132,9 +137,7 @@ class AutoEnterPipFromSplitScreenOnGoToHomeTest(flicker: LegacyFlickerTest) :
            if (flicker.scenario.isLandscapeOrSeascapeAtStart) {
                flicker.assertWmVisibleRegion(pipApp) {
                    // first check against landscape bounds then against portrait bounds
                    coversAtMost(displayBounds).then().coversAtMost(
                        portraitDisplayBounds
                    )
                    coversAtMost(displayBounds).then().coversAtMost(portraitDisplayBounds)
                }
            } else {
                // always check against the display bounds which do not change during transition
+1 −5
Original line number Diff line number Diff line
@@ -53,11 +53,7 @@ class EnterPipOnUserLeaveHintTest(flicker: LegacyFlickerTest) : EnterPipTransiti
        }
    }

    override val defaultTeardown: FlickerBuilder.() -> Unit = {
        teardown {
            pipApp.exit(wmHelper)
        }
    }
    override val defaultTeardown: FlickerBuilder.() -> Unit = { teardown { pipApp.exit(wmHelper) } }

    @Presubmit
    @Test
+1 −3
Original line number Diff line number Diff line
@@ -35,9 +35,7 @@ import org.junit.runners.Parameterized
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
class PipAspectRatioChangeTest(flicker: LegacyFlickerTest) : PipTransition(flicker) {
    override val thisTransition: FlickerBuilder.() -> Unit = {
        transitions {
            pipApp.changeAspectRatio()
        }
        transitions { pipApp.changeAspectRatio() }
    }

    @Presubmit
Loading