Index: ash/wm/shelf_layout_manager_unittest.cc |
diff --git a/ash/wm/shelf_layout_manager_unittest.cc b/ash/wm/shelf_layout_manager_unittest.cc |
index dacc7617a2ee5d829044501eae67236d901d7b2c..68b85d0e136b7d103e12944fa0fde8e89cb4b220 100644 |
--- a/ash/wm/shelf_layout_manager_unittest.cc |
+++ b/ash/wm/shelf_layout_manager_unittest.cc |
@@ -303,6 +303,7 @@ TEST_F(ShelfLayoutManagerTest, AutoHide) { |
generator.MoveMouseTo(0, 0); |
ShelfLayoutManager* shelf = GetShelfLayoutManager(); |
+ shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
views::Widget* widget = new views::Widget; |
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
params.bounds = gfx::Rect(0, 0, 200, 200); |
@@ -366,6 +367,7 @@ TEST_F(ShelfLayoutManagerTest, VisibleWhenLockScreenShowing) { |
generator.MoveMouseTo(0, 0); |
ShelfLayoutManager* shelf = GetShelfLayoutManager(); |
+ shelf->SetAutoHideBehavior(ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
views::Widget* widget = new views::Widget; |
views::Widget::InitParams params(views::Widget::InitParams::TYPE_WINDOW); |
params.bounds = gfx::Rect(0, 0, 200, 200); |
@@ -426,20 +428,12 @@ TEST_F(ShelfLayoutManagerTest, SetAutoHideBehavior) { |
aura::Window* window = widget->GetNativeWindow(); |
gfx::Rect display_bounds( |
gfx::Screen::GetDisplayNearestWindow(window).bounds()); |
- EXPECT_EQ(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize, |
- shelf->GetMaximizedWindowBounds(window).bottom()); |
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state()); |
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
EXPECT_EQ(ShelfLayoutManager::AUTO_HIDE, shelf->visibility_state()); |
EXPECT_EQ(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize, |
shelf->GetMaximizedWindowBounds(window).bottom()); |
- shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT); |
- EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state()); |
- EXPECT_EQ(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize, |
- shelf->GetMaximizedWindowBounds(window).bottom()); |
- |
shelf->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); |
EXPECT_EQ(ShelfLayoutManager::VISIBLE, shelf->visibility_state()); |
EXPECT_GT(display_bounds.bottom() - ShelfLayoutManager::kAutoHideSize, |
@@ -503,7 +497,7 @@ TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfVisibleState) { |
Shell* shell = Shell::GetInstance(); |
ShelfLayoutManager* shelf = Shell::GetInstance()->shelf(); |
shelf->LayoutShelf(); |
- shell->SetShelfAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT); |
+ shell->SetShelfAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_NEVER); |
// Create a normal unmaximized windowm shelf should be visible. |
aura::Window* window = CreateTestWindow(); |
@@ -530,7 +524,7 @@ TEST_F(ShelfLayoutManagerTest, OpenAppListWithShelfAutoHideState) { |
Shell* shell = Shell::GetInstance(); |
ShelfLayoutManager* shelf = Shell::GetInstance()->shelf(); |
shelf->LayoutShelf(); |
- shell->SetShelfAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT); |
+ shell->SetShelfAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
// Create a window and show it in maximized state. |
aura::Window* window = CreateTestWindow(); |