summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-08-02 21:48:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-08-02 21:48:54 +0000
commitce15b325e8ca15f69c2a043e47677fe60bca9cb0 (patch)
tree23091b748a0d0703f51db5b902605a72a54f50fe /tests
parent0b74a7fe5e132cb647b767b1ec2ada89a7a0c611 (diff)
parent36b54228fcb9599be91119e671cb0a4c6064e033 (diff)
downloadandroid_packages_apps_Trebuchet-ce15b325e8ca15f69c2a043e47677fe60bca9cb0.tar.gz
android_packages_apps_Trebuchet-ce15b325e8ca15f69c2a043e47677fe60bca9cb0.tar.bz2
android_packages_apps_Trebuchet-ce15b325e8ca15f69c2a043e47677fe60bca9cb0.zip
Merge "Retiring some feature flags" into ub-launcher3-master
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java19
-rw-r--r--tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java21
2 files changed, 10 insertions, 30 deletions
diff --git a/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java b/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java
index b92f61205..031909fe1 100644
--- a/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java
+++ b/tests/src/com/android/launcher3/model/GridSizeMigrationTaskTest.java
@@ -16,7 +16,6 @@ import com.android.launcher3.InvariantDeviceProfile;
import com.android.launcher3.LauncherModel;
import com.android.launcher3.LauncherProvider;
import com.android.launcher3.LauncherSettings;
-import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.GridSizeMigrationTask.MultiStepMigrationTask;
import com.android.launcher3.util.TestLauncherProvider;
@@ -87,13 +86,8 @@ public class GridSizeMigrationTaskTest {
mIdp.numHotseatIcons = 3;
new GridSizeMigrationTask(mContext, mIdp, mValidPackages, 5, 3)
.migrateHotseat();
- if (FeatureFlags.NO_ALL_APPS_ICON) {
- // First item is dropped as it has the least weight.
- verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]);
- } else {
- // First & last items are dropped as they have the least weight.
- verifyHotseat(hotseatItems[1], -1, hotseatItems[3]);
- }
+ // First item is dropped as it has the least weight.
+ verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]);
}
@Test
@@ -109,13 +103,8 @@ public class GridSizeMigrationTaskTest {
mIdp.numHotseatIcons = 3;
new GridSizeMigrationTask(mContext, mIdp, mValidPackages, 5, 3)
.migrateHotseat();
- if (FeatureFlags.NO_ALL_APPS_ICON) {
- // First item is dropped as it has the least weight.
- verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]);
- } else {
- // First & third items are dropped as they have the least weight.
- verifyHotseat(hotseatItems[1], -1, hotseatItems[4]);
- }
+ // First item is dropped as it has the least weight.
+ verifyHotseat(hotseatItems[1], hotseatItems[3], hotseatItems[4]);
}
private void verifyHotseat(long... sortedIds) {
diff --git a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
index f16f514cd..dd91fe86d 100644
--- a/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
+++ b/tests/src/com/android/launcher3/ui/AbstractLauncherUiTest.java
@@ -43,13 +43,11 @@ import com.android.launcher3.MainThreadExecutor;
import com.android.launcher3.R;
import com.android.launcher3.compat.AppWidgetManagerCompat;
import com.android.launcher3.compat.LauncherAppsCompat;
-import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.testcomponent.AppWidgetNoConfig;
import com.android.launcher3.testcomponent.AppWidgetWithConfig;
import org.junit.Before;
-import java.util.Locale;
import java.util.concurrent.Callable;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
@@ -101,19 +99,12 @@ public abstract class AbstractLauncherUiTest {
*/
protected UiObject2 openAllApps() {
mDevice.waitForIdle();
- if (FeatureFlags.NO_ALL_APPS_ICON) {
- UiObject2 hotseat = mDevice.wait(
- Until.findObject(getSelectorForId(R.id.hotseat)), 2500);
- Point start = hotseat.getVisibleCenter();
- int endY = (int) (mDevice.getDisplayHeight() * 0.1f);
- // 100 px/step
- mDevice.swipe(start.x, start.y, start.x, endY, (start.y - endY) / 100);
-
- } else {
- mDevice.wait(Until.findObject(
- By.desc(mTargetContext.getString(R.string.all_apps_button_label))),
- DEFAULT_UI_TIMEOUT).click();
- }
+ UiObject2 hotseat = mDevice.wait(
+ Until.findObject(getSelectorForId(R.id.hotseat)), 2500);
+ Point start = hotseat.getVisibleCenter();
+ int endY = (int) (mDevice.getDisplayHeight() * 0.1f);
+ // 100 px/step
+ mDevice.swipe(start.x, start.y, start.x, endY, (start.y - endY) / 100);
return findViewById(R.id.apps_list_view);
}