| Index: ash/system/overview/overview_button_tray_unittest.cc
|
| diff --git a/ash/system/overview/overview_button_tray_unittest.cc b/ash/system/overview/overview_button_tray_unittest.cc
|
| index 7139ceebac7b4f1cf27cbf36d2cd204c135132ba..d59f3df992e1be8987b5112f7e6e793a6bde83ba 100644
|
| --- a/ash/system/overview/overview_button_tray_unittest.cc
|
| +++ b/ash/system/overview/overview_button_tray_unittest.cc
|
| @@ -98,8 +98,7 @@ TEST_F(OverviewButtonTrayTest, MaximizeModeObserverOnMaximizeModeToggled) {
|
|
|
| // Tests that activating this control brings up window selection mode.
|
| TEST_F(OverviewButtonTrayTest, PerformAction) {
|
| - ASSERT_FALSE(Shell::GetInstance()->window_selector_controller()->
|
| - IsSelecting());
|
| + ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
|
|
| // Overview Mode only works when there is a window
|
| std::unique_ptr<aura::Window> window(
|
| @@ -107,14 +106,12 @@ TEST_F(OverviewButtonTrayTest, PerformAction) {
|
| ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
|
| ui::GestureEventDetails(ui::ET_GESTURE_TAP));
|
| GetTray()->PerformAction(tap);
|
| - EXPECT_TRUE(Shell::GetInstance()->window_selector_controller()->
|
| - IsSelecting());
|
| + EXPECT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
| }
|
|
|
| // Tests that tapping on the control will record the user action Tray_Overview.
|
| TEST_F(OverviewButtonTrayTest, TrayOverviewUserAction) {
|
| - ASSERT_FALSE(
|
| - Shell::GetInstance()->window_selector_controller()->IsSelecting());
|
| + ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
|
|
| // Tapping on the control when there are no windows (and thus the user cannot
|
| // enter overview mode) should still record the action.
|
| @@ -122,8 +119,7 @@ TEST_F(OverviewButtonTrayTest, TrayOverviewUserAction) {
|
| ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
|
| ui::GestureEventDetails(ui::ET_GESTURE_TAP));
|
| GetTray()->PerformAction(tap);
|
| - ASSERT_FALSE(
|
| - Shell::GetInstance()->window_selector_controller()->IsSelecting());
|
| + ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
| EXPECT_EQ(1, user_action_tester.GetActionCount(kTrayOverview));
|
|
|
| // With one window present, tapping on the control to enter overview mode
|
| @@ -131,15 +127,13 @@ TEST_F(OverviewButtonTrayTest, TrayOverviewUserAction) {
|
| std::unique_ptr<aura::Window> window(
|
| CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
|
| GetTray()->PerformAction(tap);
|
| - ASSERT_TRUE(
|
| - Shell::GetInstance()->window_selector_controller()->IsSelecting());
|
| + ASSERT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
| EXPECT_EQ(2, user_action_tester.GetActionCount(kTrayOverview));
|
|
|
| // Tapping on the control to exit overview mode should record the
|
| // user action.
|
| GetTray()->PerformAction(tap);
|
| - ASSERT_FALSE(
|
| - Shell::GetInstance()->window_selector_controller()->IsSelecting());
|
| + ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
| EXPECT_EQ(3, user_action_tester.GetActionCount(kTrayOverview));
|
| }
|
|
|
| @@ -201,8 +195,7 @@ TEST_F(OverviewButtonTrayTest, VisibilityChangesForLoginStatus) {
|
| // Tests that the tray only renders as active while selection is ongoing. Any
|
| // dismissal of overview mode clears the active state.
|
| TEST_F(OverviewButtonTrayTest, ActiveStateOnlyDuringOverviewMode) {
|
| - ASSERT_FALSE(
|
| - Shell::GetInstance()->window_selector_controller()->IsSelecting());
|
| + ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
| ASSERT_FALSE(GetTray()->draw_background_as_active());
|
|
|
| // Overview Mode only works when there is a window
|
| @@ -211,13 +204,11 @@ TEST_F(OverviewButtonTrayTest, ActiveStateOnlyDuringOverviewMode) {
|
| ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
|
| ui::GestureEventDetails(ui::ET_GESTURE_TAP));
|
| GetTray()->PerformAction(tap);
|
| - EXPECT_TRUE(
|
| - Shell::GetInstance()->window_selector_controller()->IsSelecting());
|
| + EXPECT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
| EXPECT_TRUE(GetTray()->draw_background_as_active());
|
|
|
| - Shell::GetInstance()->window_selector_controller()->OnSelectionEnded();
|
| - EXPECT_FALSE(
|
| - Shell::GetInstance()->window_selector_controller()->IsSelecting());
|
| + WmShell::Get()->window_selector_controller()->OnSelectionEnded();
|
| + EXPECT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
|
| EXPECT_FALSE(GetTray()->draw_background_as_active());
|
| }
|
|
|
|
|