Chromium Code Reviews| 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 3e0024a986d745dc56db7f99ba8b56ad7ef105b6..f8c80f2c9d0350aa486d9c7a07f2246baa0d454a 100644 |
| --- a/ash/shelf/shelf_layout_manager_unittest.cc |
| +++ b/ash/shelf/shelf_layout_manager_unittest.cc |
| @@ -22,6 +22,7 @@ |
| #include "ash/system/tray/system_tray_item.h" |
| #include "ash/test/ash_test_base.h" |
| #include "ash/test/shelf_test_api.h" |
| +#include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| #include "ash/wm/window_state.h" |
| #include "ash/wm/window_util.h" |
| #include "base/command_line.h" |
| @@ -162,7 +163,7 @@ class ShelfDragCallback { |
| EXPECT_EQ(not_visible_bounds_.bottom(), shelf_bounds.bottom()); |
| EXPECT_EQ(visible_bounds_.bottom(), shelf_bounds.bottom()); |
| } else if (SHELF_ALIGNMENT_RIGHT == |
| - GetShelfLayoutManager()->GetAlignment()){ |
| + GetShelfLayoutManager()->GetAlignment()) { |
| EXPECT_EQ(not_visible_bounds_.right(), shelf_bounds.right()); |
| EXPECT_EQ(visible_bounds_.right(), shelf_bounds.right()); |
| } else if (SHELF_ALIGNMENT_LEFT == |
| @@ -878,7 +879,8 @@ TEST_F(ShelfLayoutManagerTest, MaximizeModePreventsMouseHide) { |
| EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); |
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
| - shelf->OnMaximizeModeStarted(); |
| + Shell::GetInstance()->maximize_mode_controller()-> |
| + EnableMaximizeModeWindowManager(true); |
| // LayoutShelf() forces the animation to completion. |
| shelf->LayoutShelf(); |
| @@ -1621,7 +1623,8 @@ TEST_F(ShelfLayoutManagerTest, MaximizeModeGestureEdgeSwipe) { |
| shelf->LayoutShelf(); |
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
| - shelf->OnMaximizeModeStarted(); |
| + Shell::GetInstance()->maximize_mode_controller()-> |
| + EnableMaximizeModeWindowManager(true); |
| shelf->LayoutShelf(); |
| EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state()); |
| @@ -1960,7 +1963,7 @@ TEST_F(ShelfLayoutManagerTest, BubbleEnlargesShelfMouseHitArea) { |
| EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |
| } else { |
| // In our second iteration we show a bubble. |
| - TestItem *item = new TestItem; |
| + TestItem* item = new TestItem; |
|
jonross
2014/05/29 15:24:42
cpplint
|
| tray->AddTrayItem(item); |
| tray->ShowNotificationView(item); |
| EXPECT_TRUE(status_area_widget->IsMessageBubbleShown()); |
| @@ -2012,7 +2015,7 @@ TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColor) { |
| // Verify that the shelf doesn't have the opaque background if it's auto-hide |
| // status. |
| TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColorAutoHide) { |
| - EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget ()->GetBackgroundType()); |
| + EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType()); |
|
jonross
2014/05/29 15:24:42
cpplint
|
| GetShelfLayoutManager()->SetAutoHideBehavior(SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS); |
| scoped_ptr<aura::Window> w1(CreateTestWindow()); |
| @@ -2037,7 +2040,8 @@ TEST_F(ShelfLayoutManagerTest, DoesNotHideInMaximizeMode) { |
| EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); |
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
| - GetShelfLayoutManager()->OnMaximizeModeStarted(); |
| + Shell::GetInstance()->maximize_mode_controller()-> |
| + EnableMaximizeModeWindowManager(true); |
| EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state()); |
| EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state()); |
| @@ -2046,7 +2050,8 @@ TEST_F(ShelfLayoutManagerTest, DoesNotHideInMaximizeMode) { |
| EXPECT_EQ(SHELF_VISIBLE, shelf->visibility_state()); |
| EXPECT_EQ(SHELF_AUTO_HIDE_SHOWN, shelf->auto_hide_state()); |
| - GetShelfLayoutManager()->OnMaximizeModeEnded(); |
| + Shell::GetInstance()->maximize_mode_controller()-> |
| + EnableMaximizeModeWindowManager(false); |
| EXPECT_EQ(SHELF_AUTO_HIDE, shelf->visibility_state()); |
| EXPECT_EQ(SHELF_AUTO_HIDE_HIDDEN, shelf->auto_hide_state()); |
| } |
| @@ -2064,7 +2069,7 @@ TEST_F(ShelfLayoutManagerTest, MAYBE_StatusAreaHitBoxCoversEdge) { |
| StatusAreaWidget* status_area_widget = |
| Shell::GetPrimaryRootWindowController()->shelf()->status_area_widget(); |
| aura::test::EventGenerator generator(Shell::GetPrimaryRootWindow()); |
| - generator.MoveMouseTo(399,399); |
| + generator.MoveMouseTo(399, 399); |
|
jonross
2014/05/29 15:24:42
cpplint
|
| // Test bottom right pixel for bottom alignment. |
| EXPECT_FALSE(status_area_widget->IsMessageBubbleShown()); |