Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(375)

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 1849623002: Remove unused ash::SHELF_ALIGNMENT_TOP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index 8803c241f85b3f30fa78cdcda62e9e4cbd49c610..91d34cb478810ffbdb192687ce7dca1e0693913f 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -181,8 +181,7 @@ class ShelfDragCallback {
scroll_.x());
bool increasing_drag =
GetShelfWidget()->shelf()->SelectValueForShelfAlignment(
- scroll_delta < 0, scroll_delta > 0,
- scroll_delta < 0, scroll_delta > 0);
+ scroll_delta < 0, scroll_delta > 0, scroll_delta < 0);
int shelf_size = GetShelfLayoutManager()->PrimaryAxisValue(
shelf_bounds.height(),
shelf_bounds.width());
@@ -1707,7 +1706,7 @@ TEST_F(ShelfLayoutManagerTest, FullscreenWindowOnSecondDisplay) {
#define MAYBE_SetAlignment SetAlignment
#endif
-// Tests SHELF_ALIGNMENT_(LEFT, RIGHT, TOP).
+// Tests SHELF_ALIGNMENT_(LEFT, RIGHT).
TEST_F(ShelfLayoutManagerTest, MAYBE_SetAlignment) {
ShelfLayoutManager* shelf = GetShelfLayoutManager();
// Force an initial layout.
@@ -1774,35 +1773,6 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_SetAlignment) {
display.GetWorkAreaInsets().right());
EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
display.bounds().right() - display.work_area().right());
-
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER);
- shelf->SetAlignment(SHELF_ALIGNMENT_TOP);
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- shelf_bounds = GetShelfWidget()->GetWindowBoundsInScreen();
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- ASSERT_NE(-1, display.id());
- EXPECT_EQ(shelf->GetIdealBounds().height(),
- display.GetWorkAreaInsets().top());
- EXPECT_GE(shelf_bounds.height(),
- GetShelfWidget()->GetContentsView()->GetPreferredSize().height());
- EXPECT_EQ(SHELF_ALIGNMENT_TOP, GetSystemTray()->shelf_alignment());
- status_bounds = gfx::Rect(status_area_widget->GetWindowBoundsInScreen());
- EXPECT_GE(status_bounds.height(),
- status_area_widget->GetContentsView()->GetPreferredSize().height());
- EXPECT_EQ(shelf->GetIdealBounds().height(),
- display.GetWorkAreaInsets().top());
- EXPECT_EQ(0, display.GetWorkAreaInsets().right());
- EXPECT_EQ(0, display.GetWorkAreaInsets().bottom());
- EXPECT_EQ(0, display.GetWorkAreaInsets().left());
- EXPECT_EQ(display.work_area().y(), shelf_bounds.bottom());
- EXPECT_EQ(display.bounds().x(), shelf_bounds.x());
- EXPECT_EQ(display.bounds().width(), shelf_bounds.width());
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS);
- display = screen->GetDisplayNearestWindow(Shell::GetPrimaryRootWindow());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.GetWorkAreaInsets().top());
- EXPECT_EQ(ShelfLayoutManager::kAutoHideSize,
- display.work_area().y() - display.bounds().y());
}
TEST_F(ShelfLayoutManagerTest, GestureEdgeSwipe) {
« no previous file with comments | « ash/shelf/shelf_layout_manager.cc ('k') | ash/shelf/shelf_tooltip_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698