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

Commit 24923769 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Promote stable ime tests to presubmit" into sc-dev

parents 4cdcf412 c01fb40a
Loading
Loading
Loading
Loading
+10 −29
Original line number Original line Diff line number Diff line
@@ -17,9 +17,7 @@
package com.android.server.wm.flicker.ime
package com.android.server.wm.flicker.ime


import android.app.Instrumentation
import android.app.Instrumentation
import android.platform.test.annotations.Postsubmit
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.Presubmit
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import androidx.test.filters.RequiresDevice
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.wm.flicker.FlickerBuilderProvider
import com.android.server.wm.flicker.FlickerBuilderProvider
@@ -37,7 +35,6 @@ import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runner.RunWith
@@ -76,15 +73,15 @@ class CloseImeAutoOpenWindowToAppTest(private val testSpec: FlickerTestParameter
        }
        }
    }
    }


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun navBarWindowIsAlwaysVisible() = testSpec.navBarWindowIsAlwaysVisible()
    fun navBarWindowIsAlwaysVisible() = testSpec.navBarWindowIsAlwaysVisible()


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun statusBarWindowIsAlwaysVisible() = testSpec.statusBarWindowIsAlwaysVisible()
    fun statusBarWindowIsAlwaysVisible() = testSpec.statusBarWindowIsAlwaysVisible()


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
    fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
        testSpec.assertWm {
        testSpec.assertWm {
@@ -94,59 +91,43 @@ class CloseImeAutoOpenWindowToAppTest(private val testSpec: FlickerTestParameter
        }
        }
    }
    }


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun imeAppWindowIsAlwaysVisible() = testSpec.imeAppWindowIsAlwaysVisible(testApp)
    fun imeAppWindowIsAlwaysVisible() = testSpec.imeAppWindowIsAlwaysVisible(testApp)


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun navBarLayerIsAlwaysVisible() = testSpec.navBarLayerIsAlwaysVisible()
    fun navBarLayerIsAlwaysVisible() = testSpec.navBarLayerIsAlwaysVisible()


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun statusBarLayerIsAlwaysVisible() = testSpec.statusBarLayerIsAlwaysVisible()
    fun statusBarLayerIsAlwaysVisible() = testSpec.statusBarLayerIsAlwaysVisible()


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun noUncoveredRegions() = testSpec.noUncoveredRegions(testSpec.config.startRotation)
    fun noUncoveredRegions() = testSpec.noUncoveredRegions(testSpec.config.startRotation)


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun imeLayerBecomesInvisible() = testSpec.imeLayerBecomesInvisible()
    fun imeLayerBecomesInvisible() = testSpec.imeLayerBecomesInvisible()


    @Postsubmit
    @Presubmit
    @Test
    @Test
    fun imeAppLayerIsAlwaysVisible() = testSpec.imeAppLayerIsAlwaysVisible(testApp)
    fun imeAppLayerIsAlwaysVisible() = testSpec.imeAppLayerIsAlwaysVisible(testApp)


    @Presubmit
    @Presubmit
    @Test
    @Test
    fun navBarLayerRotatesAndScales() {
    fun navBarLayerRotatesAndScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation)
    }

    @FlakyTest
    @Test
    fun navBarLayerRotatesAndScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation)
    }
    }


    @Presubmit
    @Presubmit
    @Test
    @Test
    fun statusBarLayerRotatesScales() {
    fun statusBarLayerRotatesScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation)
    }
    }


    @FlakyTest
    @Presubmit
    @Test
    fun statusBarLayerRotatesScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation)
    }

    @FlakyTest
    @Test
    @Test
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
        testSpec.assertLayers {
        testSpec.assertLayers {
+0 −29
Original line number Original line Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.server.wm.flicker.ime
import android.app.Instrumentation
import android.app.Instrumentation
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.Surface
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import androidx.test.filters.RequiresDevice
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.wm.flicker.FlickerBuilderProvider
import com.android.server.wm.flicker.FlickerBuilderProvider
@@ -37,7 +36,6 @@ import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runner.RunWith
@@ -120,28 +118,12 @@ class CloseImeAutoOpenWindowToHomeTest(private val testSpec: FlickerTestParamete
    @Presubmit
    @Presubmit
    @Test
    @Test
    fun navBarLayerRotatesAndScales() {
    fun navBarLayerRotatesAndScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation, Surface.ROTATION_0)
    }

    @FlakyTest
    @Test
    fun navBarLayerRotatesAndScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation, Surface.ROTATION_0)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation, Surface.ROTATION_0)
    }
    }


    @Presubmit
    @Presubmit
    @Test
    @Test
    fun statusBarLayerRotatesScales() {
    fun statusBarLayerRotatesScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation, Surface.ROTATION_0)
    }

    @FlakyTest
    @Test
    fun statusBarLayerRotatesScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation, Surface.ROTATION_0)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation, Surface.ROTATION_0)
    }
    }


@@ -156,17 +138,6 @@ class CloseImeAutoOpenWindowToHomeTest(private val testSpec: FlickerTestParamete
    @Presubmit
    @Presubmit
    @Test
    @Test
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.assertLayers {
            this.visibleLayersShownMoreThanOneConsecutiveEntry(
                listOf(IME_WINDOW_TITLE, WindowManagerStateHelper.SPLASH_SCREEN_NAME))
        }
    }

    @FlakyTest
    @Test
    fun visibleLayersShownMoreThanOneConsecutiveEntry_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.assertLayers {
        testSpec.assertLayers {
            this.visibleLayersShownMoreThanOneConsecutiveEntry(
            this.visibleLayersShownMoreThanOneConsecutiveEntry(
                listOf(IME_WINDOW_TITLE, WindowManagerStateHelper.SPLASH_SCREEN_NAME))
                listOf(IME_WINDOW_TITLE, WindowManagerStateHelper.SPLASH_SCREEN_NAME))
+1 −11
Original line number Original line Diff line number Diff line
@@ -20,7 +20,6 @@ import android.app.Instrumentation
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.Surface
import android.view.WindowManagerPolicyConstants
import android.view.WindowManagerPolicyConstants
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import androidx.test.filters.RequiresDevice
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.wm.flicker.FlickerBuilderProvider
import com.android.server.wm.flicker.FlickerBuilderProvider
@@ -37,7 +36,6 @@ import com.android.server.wm.flicker.startRotation
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
import com.android.server.wm.traces.parser.windowmanager.WindowManagerStateHelper
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runner.RunWith
@@ -136,18 +134,10 @@ class CloseImeWindowToHomeTest(private val testSpec: FlickerTestParameter) {
    @Presubmit
    @Presubmit
    @Test
    @Test
    fun statusBarLayerRotatesScales() {
    fun statusBarLayerRotatesScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation, Surface.ROTATION_0)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation, Surface.ROTATION_0)
    }
    }


    @FlakyTest
    @Presubmit
    @Test
    fun statusBarLayerRotatesScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation, Surface.ROTATION_0)
    }

    @FlakyTest
    @Test
    @Test
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
        testSpec.assertLayers {
        testSpec.assertLayers {
+2 −20
Original line number Original line Diff line number Diff line
@@ -20,7 +20,6 @@ import android.app.Instrumentation
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.Surface
import android.view.WindowManagerPolicyConstants
import android.view.WindowManagerPolicyConstants
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import androidx.test.filters.RequiresDevice
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.wm.flicker.FlickerBuilderProvider
import com.android.server.wm.flicker.FlickerBuilderProvider
@@ -39,7 +38,6 @@ import com.android.server.wm.flicker.startRotation
import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runner.RunWith
@@ -119,32 +117,16 @@ class OpenImeWindowTest(private val testSpec: FlickerTestParameter) {
    @Presubmit
    @Presubmit
    @Test
    @Test
    fun navBarLayerRotatesAndScales() {
    fun navBarLayerRotatesAndScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation)
    }

    @FlakyTest
    @Test
    fun navBarLayerRotatesAndScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation)
        testSpec.navBarLayerRotatesAndScales(testSpec.config.startRotation)
    }
    }


    @Presubmit
    @Presubmit
    @Test
    @Test
    fun statusBarLayerRotatesScales() {
    fun statusBarLayerRotatesScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation)
    }

    @FlakyTest
    @Test
    fun statusBarLayerRotatesScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation)
        testSpec.statusBarLayerRotatesScales(testSpec.config.startRotation)
    }
    }


    @FlakyTest
    @Presubmit
    @Test
    @Test
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
        testSpec.assertLayers {
        testSpec.assertLayers {
@@ -152,7 +134,7 @@ class OpenImeWindowTest(private val testSpec: FlickerTestParameter) {
        }
        }
    }
    }


    @FlakyTest
    @Presubmit
    @Test
    @Test
    fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
    fun visibleWindowsShownMoreThanOneConsecutiveEntry() {
        testSpec.assertWm {
        testSpec.assertWm {
+1 −19
Original line number Original line Diff line number Diff line
@@ -20,7 +20,6 @@ import android.app.Instrumentation
import android.platform.test.annotations.Presubmit
import android.platform.test.annotations.Presubmit
import android.view.Surface
import android.view.Surface
import android.view.WindowManagerPolicyConstants
import android.view.WindowManagerPolicyConstants
import androidx.test.filters.FlakyTest
import androidx.test.filters.RequiresDevice
import androidx.test.filters.RequiresDevice
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.platform.app.InstrumentationRegistry
import com.android.server.wm.flicker.FlickerBuilderProvider
import com.android.server.wm.flicker.FlickerBuilderProvider
@@ -43,7 +42,6 @@ import com.android.server.wm.flicker.statusBarLayerIsAlwaysVisible
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarLayerRotatesScales
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.statusBarWindowIsAlwaysVisible
import com.android.server.wm.flicker.testapp.ActivityOptions
import com.android.server.wm.flicker.testapp.ActivityOptions
import org.junit.Assume
import org.junit.FixMethodOrder
import org.junit.FixMethodOrder
import org.junit.Test
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runner.RunWith
@@ -145,32 +143,16 @@ class ReOpenImeWindowTest(private val testSpec: FlickerTestParameter) {
    @Presubmit
    @Presubmit
    @Test
    @Test
    fun navBarLayerRotatesAndScales() {
    fun navBarLayerRotatesAndScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(Surface.ROTATION_0, testSpec.config.endRotation)
    }

    @FlakyTest
    @Test
    fun navBarLayerRotatesAndScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.navBarLayerRotatesAndScales(Surface.ROTATION_0, testSpec.config.endRotation)
        testSpec.navBarLayerRotatesAndScales(Surface.ROTATION_0, testSpec.config.endRotation)
    }
    }


    @Presubmit
    @Presubmit
    @Test
    @Test
    fun statusBarLayerRotatesScales() {
    fun statusBarLayerRotatesScales() {
        Assume.assumeFalse(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(Surface.ROTATION_0, testSpec.config.endRotation)
        testSpec.statusBarLayerRotatesScales(Surface.ROTATION_0, testSpec.config.endRotation)
    }
    }


    @FlakyTest
    @Presubmit
    @Test
    fun statusBarLayerRotatesScales_Flaky() {
        Assume.assumeTrue(testSpec.isRotated)
        testSpec.statusBarLayerRotatesScales(Surface.ROTATION_0, testSpec.config.endRotation)
    }

    @FlakyTest
    @Test
    @Test
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
    fun visibleLayersShownMoreThanOneConsecutiveEntry() {
        testSpec.assertLayers {
        testSpec.assertLayers {