Loading quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +1 −3 Original line number Diff line number Diff line Loading @@ -44,9 +44,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { } case TestProtocol.REQUEST_BACKGROUND_TO_OVERVIEW_SWIPE_HEIGHT: { final float swipeHeight = LayoutUtils.getShelfTrackingDistance(mContext, mDeviceProfile, PagedOrientationHandler.PORTRAIT); final float swipeHeight = mDeviceProfile.heightPx / 2f; response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight); return response; } Loading quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +16 −0 Original line number Diff line number Diff line Loading @@ -16,11 +16,13 @@ package com.android.quickstep; import static com.android.launcher3.config.FeatureFlags.ENABLE_CURSOR_HOVER_STATES; import static com.android.launcher3.testing.shared.TestProtocol.FLAKY_QUICK_SWITCH_TO_PREVIOUS_APP; import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName; import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.PERSISTENT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.TRANSIENT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; Loading Loading @@ -50,6 +52,7 @@ import com.android.launcher3.tapl.OverviewTaskMenu; import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape; import com.android.launcher3.ui.TaplTestsLauncher3; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.TestUtil; import com.android.launcher3.util.Wait; import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord; import com.android.launcher3.util.rule.TestStabilityRule; Loading Loading @@ -242,6 +245,19 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { isInState(() -> LauncherState.OVERVIEW)); } @Test @TaskbarModeSwitch(mode = TRANSIENT) public void testSwitchToOverviewWithStashedTaskbar() throws Exception { try (AutoCloseable flag = TestUtil.overrideFlag(ENABLE_CURSOR_HOVER_STATES, true)) { startTestAppsWithCheck(); // Set ignoreTaskbarVisibility, as transient taskbar will be stashed after app launch. mLauncher.setIgnoreTaskbarVisibility(true); mLauncher.getLaunchedAppState().switchToOverview(); } finally { mLauncher.setIgnoreTaskbarVisibility(false); } } @Ignore @Test @NavigationModeSwitch Loading quickstep/tests/src/com/android/quickstep/TaplTestsTransientTaskbar.java +1 −3 Original line number Diff line number Diff line Loading @@ -66,12 +66,10 @@ public class TaplTestsTransientTaskbar extends AbstractTaplTestsTaskbar { @Test @TaskbarModeSwitch(mode = TRANSIENT) public void testClickHoveredTaskbarToGoHome() { public void testClickHoveredTaskbarToGoHome() throws Exception { try (AutoCloseable flag = TestUtil.overrideFlag(ENABLE_CURSOR_HOVER_STATES, true)) { getTaskbar().getAppIcon(TEST_APP_NAME).launch(TEST_APP_PACKAGE); mLauncher.getLaunchedAppState().clickStashedTaskbarToGoHome(); } catch (Exception e) { throw new RuntimeException(e); } } } Loading
quickstep/src/com/android/quickstep/QuickstepTestInformationHandler.java +1 −3 Original line number Diff line number Diff line Loading @@ -44,9 +44,7 @@ public class QuickstepTestInformationHandler extends TestInformationHandler { } case TestProtocol.REQUEST_BACKGROUND_TO_OVERVIEW_SWIPE_HEIGHT: { final float swipeHeight = LayoutUtils.getShelfTrackingDistance(mContext, mDeviceProfile, PagedOrientationHandler.PORTRAIT); final float swipeHeight = mDeviceProfile.heightPx / 2f; response.putInt(TestProtocol.TEST_INFO_RESPONSE_FIELD, (int) swipeHeight); return response; } Loading
quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +16 −0 Original line number Diff line number Diff line Loading @@ -16,11 +16,13 @@ package com.android.quickstep; import static com.android.launcher3.config.FeatureFlags.ENABLE_CURSOR_HOVER_STATES; import static com.android.launcher3.testing.shared.TestProtocol.FLAKY_QUICK_SWITCH_TO_PREVIOUS_APP; import static com.android.launcher3.ui.TaplTestsLauncher3.getAppPackageName; import static com.android.launcher3.util.rule.TestStabilityRule.LOCAL; import static com.android.launcher3.util.rule.TestStabilityRule.PLATFORM_POSTSUBMIT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.PERSISTENT; import static com.android.quickstep.TaskbarModeSwitchRule.Mode.TRANSIENT; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; Loading Loading @@ -50,6 +52,7 @@ import com.android.launcher3.tapl.OverviewTaskMenu; import com.android.launcher3.ui.PortraitLandscapeRunner.PortraitLandscape; import com.android.launcher3.ui.TaplTestsLauncher3; import com.android.launcher3.util.DisplayController; import com.android.launcher3.util.TestUtil; import com.android.launcher3.util.Wait; import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord; import com.android.launcher3.util.rule.TestStabilityRule; Loading Loading @@ -242,6 +245,19 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { isInState(() -> LauncherState.OVERVIEW)); } @Test @TaskbarModeSwitch(mode = TRANSIENT) public void testSwitchToOverviewWithStashedTaskbar() throws Exception { try (AutoCloseable flag = TestUtil.overrideFlag(ENABLE_CURSOR_HOVER_STATES, true)) { startTestAppsWithCheck(); // Set ignoreTaskbarVisibility, as transient taskbar will be stashed after app launch. mLauncher.setIgnoreTaskbarVisibility(true); mLauncher.getLaunchedAppState().switchToOverview(); } finally { mLauncher.setIgnoreTaskbarVisibility(false); } } @Ignore @Test @NavigationModeSwitch Loading
quickstep/tests/src/com/android/quickstep/TaplTestsTransientTaskbar.java +1 −3 Original line number Diff line number Diff line Loading @@ -66,12 +66,10 @@ public class TaplTestsTransientTaskbar extends AbstractTaplTestsTaskbar { @Test @TaskbarModeSwitch(mode = TRANSIENT) public void testClickHoveredTaskbarToGoHome() { public void testClickHoveredTaskbarToGoHome() throws Exception { try (AutoCloseable flag = TestUtil.overrideFlag(ENABLE_CURSOR_HOVER_STATES, true)) { getTaskbar().getAppIcon(TEST_APP_NAME).launch(TEST_APP_PACKAGE); mLauncher.getLaunchedAppState().clickStashedTaskbarToGoHome(); } catch (Exception e) { throw new RuntimeException(e); } } }