summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-05-25 18:56:41 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-06-06 16:15:46 -0700
commit47328fd53f43fd0c2ed14ad925dd04483f9229a0 (patch)
tree68584a0a8662f18241748b22f061c564acae790b /tests
parent63741779e564ea9c6814800199b994f7464906db (diff)
downloadandroid_packages_apps_Trebuchet-47328fd53f43fd0c2ed14ad925dd04483f9229a0.tar.gz
android_packages_apps_Trebuchet-47328fd53f43fd0c2ed14ad925dd04483f9229a0.tar.bz2
android_packages_apps_Trebuchet-47328fd53f43fd0c2ed14ad925dd04483f9229a0.zip
Removing the SearchDropTarget bar as it no longer contains the QSB
> Renaming it to simply DropTargetBar > Moving AppInfo to the top bar as well > The workspace pages will extend to the top edge (minus some padding). Since the QSB is no longer displayed on top of every page, there is no reason to reserve the space. > In spring-loaded mode, the workspace cell layout will scale enough to make room for the drop target bar at the top Change-Id: I2baf607310335dd576c9d9fcbb75ab708f47ac03
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/android/launcher3/InvariantDeviceProfileTest.java71
1 files changed, 0 insertions, 71 deletions
diff --git a/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java b/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
index 476eb0afb..35f686f55 100644
--- a/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
+++ b/tests/src/com/android/launcher3/InvariantDeviceProfileTest.java
@@ -116,75 +116,4 @@ public class InvariantDeviceProfileTest extends AndroidTestCase {
// Add more tests for other devices, however, running them once on a single device is enough
// for verifying that for a platform version, the WindowManager and DisplayMetrics is
// working as intended.
-
- /**
- * Make sure that the height for the QSB is what we expect in normal mode.
- */
- public void testQsbNormalHeight() {
- Resources resources = getContext().getResources();
- DeviceProfile landscapeProfile = mInvariantProfile.landscapeProfile;
- DeviceProfile portraitProfile = mInvariantProfile.portraitProfile;
- landscapeProfile.setSearchBarHeight(LauncherCallbacks.SEARCH_BAR_HEIGHT_NORMAL);
- portraitProfile.setSearchBarHeight(LauncherCallbacks.SEARCH_BAR_HEIGHT_NORMAL);
- Rect portraitBounds = portraitProfile.getSearchBarBounds(true); // RTL shouldn't matter.
- int portraitHeight = (int) Utilities.dpiFromPx(portraitBounds.height(),
- resources.getDisplayMetrics());
- Rect landscapeBounds = landscapeProfile.getSearchBarBounds(true); // RTL shouldn't matter.
- int landscapeHeight = (int) Utilities.dpiFromPx(landscapeBounds.height(),
- resources.getDisplayMetrics());
- if (portraitProfile.isTablet) {
- assertEquals(8 + 48 + 24, portraitHeight);
- } else {
- assertEquals(8 + 48 + 12, 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.
- Point portraitDimens = portraitProfile.getSearchBarDimensForWidgetOpts(resources);
- int portraitWidgetOptsHeight = portraitDimens.y;
- Point landscapeDimens = landscapeProfile.getSearchBarDimensForWidgetOpts(resources);
- int landscapeWidgetOptsHeight = landscapeDimens.y;
- assertEquals(8 + 48 + 8, (int) Utilities.dpiFromPx(portraitWidgetOptsHeight,
- resources.getDisplayMetrics()));
- if (!landscapeProfile.isVerticalBarLayout()) {
- assertEquals(portraitHeight, landscapeHeight);
- assertEquals(portraitWidgetOptsHeight, landscapeWidgetOptsHeight);
- }
- }
-
- /**
- * Make sure that the height for the QSB is what we expect in tall mode.
- */
- public void testQsbTallHeight() {
- Resources resources = getContext().getResources();
- DeviceProfile landscapeProfile = mInvariantProfile.landscapeProfile;
- DeviceProfile portraitProfile = mInvariantProfile.portraitProfile;
- landscapeProfile.setSearchBarHeight(LauncherCallbacks.SEARCH_BAR_HEIGHT_TALL);
- portraitProfile.setSearchBarHeight(LauncherCallbacks.SEARCH_BAR_HEIGHT_TALL);
- Rect portraitBounds = portraitProfile.getSearchBarBounds(true); // RTL shouldn't matter.
- int portraitHeight = (int) Utilities.dpiFromPx(portraitBounds.height(),
- resources.getDisplayMetrics());
- Rect landscapeBounds = landscapeProfile.getSearchBarBounds(true); // RTL shouldn't matter.
- int landscapeHeight = (int) Utilities.dpiFromPx(landscapeBounds.height(),
- resources.getDisplayMetrics());
- if (portraitProfile.isPhone) {
- // This fails on some devices due to http://b/26884580 (portraitHeight is 101, not 100).
- // TODO: Remove the comparision against 101 once b/26884580 is fixed
- // assertEquals(4 + 94 + 2, portraitHeight);
- assertTrue(portraitHeight == (4 + 94 + 2) || portraitHeight == (4 + 95 + 2));
- } else {
- 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.
- Point portraitDimens = portraitProfile.getSearchBarDimensForWidgetOpts(resources);
- int portraitWidgetOptsHeight = portraitDimens.y;
- Point landscapeDimens = landscapeProfile.getSearchBarDimensForWidgetOpts(resources);
- int landscapeWidgetOptsHeight = landscapeDimens.y;
- assertEquals(8 + 94 + 8, (int) Utilities.dpiFromPx(portraitWidgetOptsHeight,
- resources.getDisplayMetrics()));
- if (!landscapeProfile.isVerticalBarLayout()) {
- assertEquals(portraitHeight, landscapeHeight);
- assertEquals(portraitWidgetOptsHeight, landscapeWidgetOptsHeight);
- }
- }
}