summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2016-02-01 14:51:35 -0800
committerTony Wickham <twickham@google.com>2016-02-01 14:51:35 -0800
commitc32c63c46e933fb6c9038f6e18f24a2fef7eff9c (patch)
tree099fda5e4089ae87581ae31e157dd9570bf642e6 /tests
parentad37152c14c716f678d07dd568811a9704c2a9c8 (diff)
parentb9759d399be4269a65b08988e50148f7d971fdf3 (diff)
downloadandroid_packages_apps_Trebuchet-c32c63c46e933fb6c9038f6e18f24a2fef7eff9c.tar.gz
android_packages_apps_Trebuchet-c32c63c46e933fb6c9038f6e18f24a2fef7eff9c.tar.bz2
android_packages_apps_Trebuchet-c32c63c46e933fb6c9038f6e18f24a2fef7eff9c.zip
resolve merge conflicts of b9759d399b to ub-launcher3-calgary.
Change-Id: I66230c15e5eaeef316d4e2f14b85c6ff1b6e977d
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/InvariantDeviceProfileTest.java21
1 files changed, 8 insertions, 13 deletions
diff --git a/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java b/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
index db3f72f3a..21df60109 100644
--- a/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
+++ b/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
@@ -108,15 +108,9 @@ public class InvariantDeviceProfileTest extends AndroidTestCase {
if (!android.os.Build.DEVICE.equals("hammerhead")) {
return;
}
- assertEquals(mInvariantProfile.numRows, 4);
- assertEquals(mInvariantProfile.numColumns, 4);
- assertEquals((int) mInvariantProfile.numHotseatIcons, 5);
-
- DeviceProfile landscapeProfile = mInvariantProfile.landscapeProfile;
- DeviceProfile portraitProfile = mInvariantProfile.portraitProfile;
-
- assertEquals(portraitProfile.allAppsNumCols, 3);
- assertEquals(landscapeProfile.allAppsNumCols, 5); // not used
+ assertEquals(4, mInvariantProfile.numRows);
+ assertEquals(4, mInvariantProfile.numColumns);
+ assertEquals(5, mInvariantProfile.numHotseatIcons);
}
// Add more tests for other devices, however, running them once on a single device is enough
@@ -172,10 +166,11 @@ public class InvariantDeviceProfileTest extends AndroidTestCase {
Rect landscapeBounds = landscapeProfile.getSearchBarBounds(true); // RTL shouldn't matter.
int landscapeHeight = (int) Utilities.dpiFromPx(landscapeBounds.height(),
resources.getDisplayMetrics());
- if (portraitProfile.isTablet) {
- assertEquals(8 + 80 + 24, portraitHeight);
+ if (portraitProfile.isPhone) {
+ // This fails on some devices due to http://b/26884580 (portraitHeight is 101, not 100).
+ assertEquals(4 + 94 + 2, portraitHeight);
} else {
- assertEquals(8 + 80 + 2, portraitHeight);
+ assertEquals(8 + 94 + 24, portraitHeight);
}
// Make sure the height that we pass in the widget options bundle is the height of the
// search bar + 8dps padding top and bottom.
@@ -183,7 +178,7 @@ public class InvariantDeviceProfileTest extends AndroidTestCase {
int portraitWidgetOptsHeight = portraitDimens.y;
Point landscapeDimens = landscapeProfile.getSearchBarDimensForWidgetOpts(resources);
int landscapeWidgetOptsHeight = landscapeDimens.y;
- assertEquals(8 + 80 + 8, (int) Utilities.dpiFromPx(portraitWidgetOptsHeight,
+ assertEquals(8 + 94 + 8, (int) Utilities.dpiFromPx(portraitWidgetOptsHeight,
resources.getDisplayMetrics()));
if (!landscapeProfile.isVerticalBarLayout()) {
assertEquals(portraitHeight, landscapeHeight);