Merge changes from topic "flicker" am: db3931fe93
Change-Id: I83465801ae7ed2af1d6cec9669522e55b321231a
This commit is contained in:
@@ -175,11 +175,15 @@ class CommonTransitions {
|
||||
.repeat(ITERATIONS);
|
||||
}
|
||||
|
||||
static TransitionBuilder appToSplitScreen(IAppHelper testApp, UiDevice device) {
|
||||
static TransitionBuilder appToSplitScreen(IAppHelper testApp, UiDevice device,
|
||||
int beginRotation) {
|
||||
final String testTag = "appToSplitScreen_" + testApp.getLauncherName() + "_"
|
||||
+ rotationToString(beginRotation);
|
||||
return TransitionRunner.newBuilder()
|
||||
.withTag("appToSplitScreen_" + testApp.getLauncherName())
|
||||
.withTag(testTag)
|
||||
.recordAllRuns()
|
||||
.runBeforeAll(AutomationUtils::wakeUpAndGoToHomeScreen)
|
||||
.runBeforeAll(() -> setRotation(device, beginRotation))
|
||||
.runBefore(testApp::open)
|
||||
.runBefore(device::waitForIdle)
|
||||
.runBefore(() -> sleep(500))
|
||||
|
||||
@@ -94,7 +94,8 @@ public class DebugTest {
|
||||
*/
|
||||
@Test
|
||||
public void openAppToSplitScreen() {
|
||||
CommonTransitions.appToSplitScreen(testApp, uiDevice).includeJankyRuns().recordAllRuns()
|
||||
CommonTransitions.appToSplitScreen(testApp, uiDevice,
|
||||
Surface.ROTATION_0).includeJankyRuns().recordAllRuns()
|
||||
.build().run();
|
||||
}
|
||||
|
||||
|
||||
@@ -17,35 +17,38 @@
|
||||
package com.android.server.wm.flicker;
|
||||
|
||||
import static com.android.server.wm.flicker.CommonTransitions.appToSplitScreen;
|
||||
import static com.android.server.wm.flicker.WindowUtils.getDisplayBounds;
|
||||
|
||||
import androidx.test.InstrumentationRegistry;
|
||||
import androidx.test.filters.LargeTest;
|
||||
import androidx.test.runner.AndroidJUnit4;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.FixMethodOrder;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.MethodSorters;
|
||||
import org.junit.runners.Parameterized;
|
||||
|
||||
/**
|
||||
* Test open app to split screen.
|
||||
* To run this test: {@code atest FlickerTests:OpenAppToSplitScreenTest}
|
||||
*/
|
||||
@LargeTest
|
||||
@RunWith(AndroidJUnit4.class)
|
||||
@RunWith(Parameterized.class)
|
||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class OpenAppToSplitScreenTest extends FlickerTestBase {
|
||||
public class OpenAppToSplitScreenTest extends NonRotationTestBase {
|
||||
|
||||
public OpenAppToSplitScreenTest(String beginRotationName, int beginRotation) {
|
||||
super(beginRotationName, beginRotation);
|
||||
|
||||
public OpenAppToSplitScreenTest() {
|
||||
this.mTestApp = new StandardAppHelper(InstrumentationRegistry.getInstrumentation(),
|
||||
"com.android.server.wm.flicker.testapp", "SimpleApp");
|
||||
}
|
||||
|
||||
@Before
|
||||
public void runTransition() {
|
||||
super.runTransition(appToSplitScreen(mTestApp, mUiDevice).includeJankyRuns().build());
|
||||
super.runTransition(appToSplitScreen(mTestApp, mUiDevice, mBeginRotation)
|
||||
.includeJankyRuns()
|
||||
.build());
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -69,25 +72,6 @@ public class OpenAppToSplitScreenTest extends FlickerTestBase {
|
||||
.forAllEntries());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkCoveredRegion_noUncoveredRegions() {
|
||||
checkResults(result ->
|
||||
LayersTraceSubject.assertThat(result)
|
||||
.coversRegion(getDisplayBounds()).forAllEntries());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkVisibility_navBarLayerIsAlwaysVisible() {
|
||||
checkResults(result -> LayersTraceSubject.assertThat(result)
|
||||
.showsLayer(NAVIGATION_BAR_WINDOW_TITLE).forAllEntries());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkVisibility_statusBarLayerIsAlwaysVisible() {
|
||||
checkResults(result -> LayersTraceSubject.assertThat(result)
|
||||
.showsLayer(STATUS_BAR_WINDOW_TITLE).forAllEntries());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void checkVisibility_dividerLayerBecomesVisible() {
|
||||
checkResults(result -> LayersTraceSubject.assertThat(result)
|
||||
|
||||
Reference in New Issue
Block a user