From b297c7e615272bc93084eda921f47c2263ef4625 Mon Sep 17 00:00:00 2001 From: Alex Chau Date: Fri, 2 Jul 2021 15:11:29 +0100 Subject: [PATCH] Add screen record for failing TaplTestsQuickstep - For debugging failures that only happnes on cuttlefish Bug: 191344757 Test: TaplTestsQuickstep Change-Id: Iac16e222dc7b60f94e1eb7f305c5ccb909161783 --- .../src/com/android/quickstep/TaplTestsQuickstep.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java index a5038a1fb0..9a6eda4767 100644 --- a/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java +++ b/quickstep/tests/src/com/android/quickstep/TaplTestsQuickstep.java @@ -23,7 +23,6 @@ import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import android.content.Intent; -import android.util.Log; import androidx.test.filters.LargeTest; import androidx.test.runner.AndroidJUnit4; @@ -37,8 +36,8 @@ import com.android.launcher3.tapl.LauncherInstrumentation.NavigationModel; import com.android.launcher3.tapl.Overview; import com.android.launcher3.tapl.OverviewActions; import com.android.launcher3.tapl.OverviewTask; -import com.android.launcher3.testing.TestProtocol; import com.android.launcher3.ui.TaplTestsLauncher3; +import com.android.launcher3.util.rule.ScreenRecordRule.ScreenRecord; import com.android.quickstep.NavigationModeSwitchRule.NavigationModeSwitch; import com.android.quickstep.views.RecentsView; @@ -94,6 +93,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape + @ScreenRecord //b/191344757 public void testOverview() throws Exception { startTestAppsWithCheck(); // mLauncher.pressHome() also tests an important case of pressing home while in background. @@ -163,6 +163,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @NavigationModeSwitch @PortraitLandscape + @ScreenRecord //b/191344757 public void testOverviewActions() throws Exception { // Experimenting for b/165029151: final Overview overview = mLauncher.pressHome().switchToOverview(); @@ -188,6 +189,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @NavigationModeSwitch @PortraitLandscape + @ScreenRecord //b/191344757 public void testSwitchToOverview() throws Exception { assertNotNull("Workspace.switchToOverview() returned null", mLauncher.pressHome().switchToOverview()); @@ -198,6 +200,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @NavigationModeSwitch @PortraitLandscape + @ScreenRecord //b/191344757 public void testBackground() throws Exception { startAppFast(resolveSystemApp(Intent.CATEGORY_APP_CALCULATOR)); final Background background = getAndAssertBackground(); @@ -219,6 +222,7 @@ public class TaplTestsQuickstep extends AbstractQuickStepTest { @Test @PortraitLandscape + @ScreenRecord //b/191344757 public void testAllAppsFromHome() throws Exception { // Test opening all apps assertNotNull("switchToAllApps() returned null",