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

Commit f7e74fca authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Ensure screenshot layer appears during rotation am: 6a087ec8 am: f401edf4 am: a96b1f5a

Change-Id: Ie1984af5d3480a90447d3039c2c486884989a3e3
parents 62648160 a96b1f5a
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -144,6 +144,19 @@ public class ChangeAppRotationTest extends FlickerTestBase {
        );
    }

    @Test
    public void checkVisibility_screenshotLayerBecomesInvisible() {
        checkResults(result -> LayersTraceSubject.assertThat(result)
                .showsLayer(mTestApp.getPackage())
                .then()
                .replaceVisibleLayer(mTestApp.getPackage(), "Screenshot")
                .then()
                .showsLayer(mTestApp.getPackage()).and().showsLayer("Screenshot")
                .then()
                .replaceVisibleLayer("Screenshot", mTestApp.getPackage())
                .forAllEntries());
    }

    @FlakyTest(bugId = 140855415)
    @Ignore("Waiting bug feedback")
    @Test
+17 −5
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package com.android.server.wm.flicker;
import static com.android.server.wm.flicker.CommonTransitions.openAppCold;
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;

import android.view.Surface;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.LargeTest;
@@ -76,10 +78,20 @@ public class OpenAppColdTest extends NonRotationTestBase {

    @Test
    public void checkVisibility_wallpaperLayerBecomesInvisible() {
        if (mBeginRotation == Surface.ROTATION_0) {
            checkResults(result -> LayersTraceSubject.assertThat(result)
                    .showsLayer("Wallpaper")
                    .then()
                .hidesLayer("Wallpaper")
                    .replaceVisibleLayer("Wallpaper", mTestApp.getPackage())
                    .forAllEntries());
        } else {
            checkResults(result -> LayersTraceSubject.assertThat(result)
                    .showsLayer("Wallpaper")
                    .then()
                    .replaceVisibleLayer("Wallpaper", "Screenshot")
                    .then()
                    .showsLayer(mTestApp.getPackage())
                    .forAllEntries());
        }
    }
}
+17 −5
Original line number Diff line number Diff line
@@ -19,6 +19,8 @@ package com.android.server.wm.flicker;
import static com.android.server.wm.flicker.CommonTransitions.openAppWarm;
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;

import android.view.Surface;

import androidx.test.InstrumentationRegistry;
import androidx.test.filters.FlakyTest;
import androidx.test.filters.LargeTest;
@@ -76,10 +78,20 @@ public class OpenAppWarmTest extends NonRotationTestBase {

    @Test
    public void checkVisibility_wallpaperLayerBecomesInvisible() {
        if (mBeginRotation == Surface.ROTATION_0) {
            checkResults(result -> LayersTraceSubject.assertThat(result)
                    .showsLayer("Wallpaper")
                    .then()
                .hidesLayer("Wallpaper")
                    .replaceVisibleLayer("Wallpaper", mTestApp.getPackage())
                    .forAllEntries());
        } else {
            checkResults(result -> LayersTraceSubject.assertThat(result)
                    .showsLayer("Wallpaper")
                    .then()
                    .replaceVisibleLayer("Wallpaper", "Screenshot")
                    .then()
                    .showsLayer(mTestApp.getPackage())
                    .forAllEntries());
        }
    }
}