Ensure screenshot layer appears during rotation
Add some additional checks on flicker tests to ensure that the screenshot layer ir correctly being displayed during the rotation animation. Test: atest FlickerTests:ChangeAppRotationTest, atest FlickerTests:OpenAppColdTest and atest FlickerTests:OpenAppWarmTest Change-Id: I2a6c74179c07eee86caae08f05430752aa4e084e
This commit is contained in:
@@ -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)
|
@FlakyTest(bugId = 140855415)
|
||||||
@Ignore("Waiting bug feedback")
|
@Ignore("Waiting bug feedback")
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -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.CommonTransitions.openAppCold;
|
||||||
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;
|
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;
|
||||||
|
|
||||||
|
import android.view.Surface;
|
||||||
|
|
||||||
import androidx.test.InstrumentationRegistry;
|
import androidx.test.InstrumentationRegistry;
|
||||||
import androidx.test.filters.FlakyTest;
|
import androidx.test.filters.FlakyTest;
|
||||||
import androidx.test.filters.LargeTest;
|
import androidx.test.filters.LargeTest;
|
||||||
@@ -76,10 +78,20 @@ public class OpenAppColdTest extends NonRotationTestBase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void checkVisibility_wallpaperLayerBecomesInvisible() {
|
public void checkVisibility_wallpaperLayerBecomesInvisible() {
|
||||||
checkResults(result -> LayersTraceSubject.assertThat(result)
|
if (mBeginRotation == Surface.ROTATION_0) {
|
||||||
.showsLayer("Wallpaper")
|
checkResults(result -> LayersTraceSubject.assertThat(result)
|
||||||
.then()
|
.showsLayer("Wallpaper")
|
||||||
.hidesLayer("Wallpaper")
|
.then()
|
||||||
.forAllEntries());
|
.replaceVisibleLayer("Wallpaper", mTestApp.getPackage())
|
||||||
|
.forAllEntries());
|
||||||
|
} else {
|
||||||
|
checkResults(result -> LayersTraceSubject.assertThat(result)
|
||||||
|
.showsLayer("Wallpaper")
|
||||||
|
.then()
|
||||||
|
.replaceVisibleLayer("Wallpaper", "Screenshot")
|
||||||
|
.then()
|
||||||
|
.showsLayer(mTestApp.getPackage())
|
||||||
|
.forAllEntries());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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.CommonTransitions.openAppWarm;
|
||||||
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;
|
import static com.android.server.wm.flicker.WmTraceSubject.assertThat;
|
||||||
|
|
||||||
|
import android.view.Surface;
|
||||||
|
|
||||||
import androidx.test.InstrumentationRegistry;
|
import androidx.test.InstrumentationRegistry;
|
||||||
import androidx.test.filters.FlakyTest;
|
import androidx.test.filters.FlakyTest;
|
||||||
import androidx.test.filters.LargeTest;
|
import androidx.test.filters.LargeTest;
|
||||||
@@ -76,10 +78,20 @@ public class OpenAppWarmTest extends NonRotationTestBase {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void checkVisibility_wallpaperLayerBecomesInvisible() {
|
public void checkVisibility_wallpaperLayerBecomesInvisible() {
|
||||||
checkResults(result -> LayersTraceSubject.assertThat(result)
|
if (mBeginRotation == Surface.ROTATION_0) {
|
||||||
.showsLayer("Wallpaper")
|
checkResults(result -> LayersTraceSubject.assertThat(result)
|
||||||
.then()
|
.showsLayer("Wallpaper")
|
||||||
.hidesLayer("Wallpaper")
|
.then()
|
||||||
.forAllEntries());
|
.replaceVisibleLayer("Wallpaper", mTestApp.getPackage())
|
||||||
|
.forAllEntries());
|
||||||
|
} else {
|
||||||
|
checkResults(result -> LayersTraceSubject.assertThat(result)
|
||||||
|
.showsLayer("Wallpaper")
|
||||||
|
.then()
|
||||||
|
.replaceVisibleLayer("Wallpaper", "Screenshot")
|
||||||
|
.then()
|
||||||
|
.showsLayer(mTestApp.getPackage())
|
||||||
|
.forAllEntries());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user