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

Commit 1f466d50 authored by CHIA-HSUAN HSU (xWF)'s avatar CHIA-HSUAN HSU (xWF) Committed by Android (Google) Code Review
Browse files

Merge "b/429954503 Remove BringDesktopAppsToFront, since there is already the...

Merge "b/429954503 Remove BringDesktopAppsToFront, since there is already the test bringToFront on SwitchFocusBetweenAppsTest" into main
parents 082eacce 7c33f3b9
Loading
Loading
Loading
Loading
+0 −52
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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

import android.tools.Rotation.ROTATION_90
import android.tools.flicker.FlickerConfig
import android.tools.flicker.annotation.ExpectedScenarios
import android.tools.flicker.annotation.FlickerConfigProvider
import android.tools.flicker.config.FlickerConfig
import android.tools.flicker.config.FlickerServiceConfig
import android.tools.flicker.junit.FlickerServiceJUnit4ClassRunner
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.flicker.DesktopModeFlickerScenarios.Companion.BRING_APPS_TO_FRONT
import com.android.wm.shell.scenarios.BringDesktopAppsToFront
import org.junit.Test
import org.junit.runner.RunWith

/**
 * Bring apps to front by clicking on the App Header.
 *
 * Assert that the app windows move to front.
 */
@RequiresDevice
@RunWith(FlickerServiceJUnit4ClassRunner::class)
class BringDesktopAppsToFrontLandscape : BringDesktopAppsToFront(rotation = ROTATION_90) {

    @ExpectedScenarios(["BRING_APPS_TO_FRONT"])
    @Test
    override fun bringDesktopAppsToFront() = super.bringDesktopAppsToFront()

    companion object {
        @JvmStatic
        @FlickerConfigProvider
        fun flickerConfigProvider(): FlickerConfig =
            FlickerConfig()
                .use(FlickerServiceConfig.DEFAULT)
                .use(BRING_APPS_TO_FRONT)
    }
}
+0 −52
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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

import android.tools.Rotation.ROTATION_0
import android.tools.flicker.FlickerConfig
import android.tools.flicker.annotation.ExpectedScenarios
import android.tools.flicker.annotation.FlickerConfigProvider
import android.tools.flicker.config.FlickerConfig
import android.tools.flicker.config.FlickerServiceConfig
import android.tools.flicker.junit.FlickerServiceJUnit4ClassRunner
import androidx.test.filters.RequiresDevice
import com.android.wm.shell.flicker.DesktopModeFlickerScenarios.Companion.BRING_APPS_TO_FRONT
import com.android.wm.shell.scenarios.BringDesktopAppsToFront
import org.junit.Test
import org.junit.runner.RunWith

/**
 * Bring apps to front by clicking on the App Header.
 *
 * Assert that the app windows move to front.
 */
@RequiresDevice
@RunWith(FlickerServiceJUnit4ClassRunner::class)
class BringDesktopAppsToFrontPortrait : BringDesktopAppsToFront(rotation = ROTATION_0) {

    @ExpectedScenarios(["BRING_APPS_TO_FRONT"])
    @Test
    override fun bringDesktopAppsToFront() = super.bringDesktopAppsToFront()

    companion object {
        @JvmStatic
        @FlickerConfigProvider
        fun flickerConfigProvider(): FlickerConfig =
            FlickerConfig()
                .use(FlickerServiceConfig.DEFAULT)
                .use(BRING_APPS_TO_FRONT)
    }
}
+0 −8
Original line number Diff line number Diff line
@@ -77,13 +77,6 @@ test_module_config {
    include_filters: ["com.android.wm.shell.functional.AltTabSwitchOutDesktopModeTest"],
}

test_module_config {
    name: "FunctionalTestsDesktopMode-BringDesktopAppsToFrontTest",
    base: "FunctionalTestsDesktopMode",
    test_suites: ["device-tests"],
    include_filters: ["com.android.wm.shell.functional.BringDesktopAppsToFrontTest"],
}

test_module_config {
    name: "FunctionalTestsDesktopMode-CatchAll",
    base: "FunctionalTestsDesktopMode",
@@ -91,7 +84,6 @@ test_module_config {
    exclude_filters: [
        "com.android.wm.shell.functional.AltTabSwitchInDesktopModeTest",
        "com.android.wm.shell.functional.AltTabSwitchOutDesktopModeTest",
        "com.android.wm.shell.functional.BringDesktopAppsToFrontTest",
        "com.android.wm.shell.functional.ChromeNewTabAtWindowLimitTest",
        "com.android.wm.shell.functional.CloseAllAppsWithAppHeaderExitTest",
        "com.android.wm.shell.functional.DisableDisplayMirroringSwitchTest",
+0 −3
Original line number Diff line number Diff line
@@ -12,9 +12,6 @@
    {
      "name": "FunctionalTestsDesktopMode-AltTabSwitchOutDesktopModeTest"
    },
    {
      "name": "FunctionalTestsDesktopMode-BringDesktopAppsToFrontTest"
    },
    {
      "name": "FunctionalTestsDesktopMode-CatchAll"
    },
+0 −28
Original line number Diff line number Diff line
/*
 * Copyright (C) 2024 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.functional

import android.platform.test.annotations.Presubmit
import android.platform.test.rule.ScreenRecordRule
import com.android.wm.shell.scenarios.BringDesktopAppsToFront
import org.junit.runner.RunWith
import org.junit.runners.BlockJUnit4ClassRunner

/** Functional test for [BringDesktopAppsToFront]. */
@RunWith(BlockJUnit4ClassRunner::class)
@Presubmit
@ScreenRecordRule.ScreenRecord
class BringDesktopAppsToFrontTest : BringDesktopAppsToFront()
Loading