summaryrefslogtreecommitdiffstats
path: root/quickstep/tests/src
diff options
context:
space:
mode:
authorvadimt <vadimt@google.com>2019-04-18 10:03:21 -0700
committervadimt <vadimt@google.com>2019-04-18 12:16:01 -0700
commitdd0b3624a5a7180a0153225a22ef308c76069164 (patch)
tree1c297972cd2501f6a95eade39c2de6ea4afcd1fa /quickstep/tests/src
parent44a063a16fd60a4fdbdb1a93cefcfffbe7428051 (diff)
downloadandroid_packages_apps_Trebuchet-dd0b3624a5a7180a0153225a22ef308c76069164.tar.gz
android_packages_apps_Trebuchet-dd0b3624a5a7180a0153225a22ef308c76069164.tar.bz2
android_packages_apps_Trebuchet-dd0b3624a5a7180a0153225a22ef308c76069164.zip
Enabling continuous testing of all 3 modes of navigation
This is likely going to result in flaky tests, but we'll benefit more from having these tests than not. We'll track all flakes that are going to pop up as bugs. Change-Id: I73902a1bce8181d522376ff912e238ec84ef1eed
Diffstat (limited to 'quickstep/tests/src')
-rw-r--r--quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
index 6034791d7..e552f56ba 100644
--- a/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
+++ b/quickstep/tests/src/com/android/quickstep/NavigationModeSwitchRule.java
@@ -21,6 +21,7 @@ import static androidx.test.InstrumentationRegistry.getInstrumentation;
import static com.android.quickstep.NavigationModeSwitchRule.Mode.ALL;
import static com.android.quickstep.NavigationModeSwitchRule.Mode.THREE_BUTTON;
import static com.android.quickstep.NavigationModeSwitchRule.Mode.TWO_BUTTON;
+import static com.android.quickstep.NavigationModeSwitchRule.Mode.ZERO_BUTTON;
import static com.android.systemui.shared.system.QuickStepContract.NAV_BAR_MODE_2BUTTON_OVERLAY;
import static com.android.systemui.shared.system.QuickStepContract.NAV_BAR_MODE_3BUTTON_OVERLAY;
import static com.android.systemui.shared.system.QuickStepContract.NAV_BAR_MODE_GESTURAL_OVERLAY;
@@ -85,9 +86,9 @@ public class NavigationModeSwitchRule implements TestRule {
final LauncherInstrumentation.NavigationModel originalMode =
mLauncher.getNavigationModel();
try {
-// if (mode == ZERO_BUTTON || mode == ALL) {
-// evaluateWithZeroButtons();
-// }
+ if (mode == ZERO_BUTTON || mode == ALL) {
+ evaluateWithZeroButtons();
+ }
if (mode == TWO_BUTTON || mode == ALL) {
evaluateWithTwoButtons();
}
@@ -131,7 +132,10 @@ public class NavigationModeSwitchRule implements TestRule {
overlayPackage == NAV_BAR_MODE_GESTURAL_OVERLAY);
for (int i = 0; i != 100; ++i) {
- if (mLauncher.getNavigationModel() == expectedMode) return;
+ if (mLauncher.getNavigationModel() == expectedMode) {
+ Thread.sleep(1000);
+ return;
+ }
Thread.sleep(100);
}
Assert.fail("Couldn't switch to " + overlayPackage);