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

Unified Diff: ash/system/overview/overview_button_tray_unittest.cc

Issue 2775973002: Promotes more accessors from WmShell to Shell (Closed)
Patch Set: feedback Created 3 years, 9 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/system/chromeos/power/power_event_observer.cc ('k') | ash/virtual_keyboard_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51ab6906008cf83113fef87cf517826b385578bc..fbd5bae39799b82382d08b307ff1c885fcbfe1b6 100644
--- a/ash/system/overview/overview_button_tray_unittest.cc
+++ b/ash/system/overview/overview_button_tray_unittest.cc
@@ -98,7 +98,7 @@ TEST_F(OverviewButtonTrayTest, MaximizeModeObserverOnMaximizeModeToggled) {
// Tests that activating this control brings up window selection mode.
TEST_F(OverviewButtonTrayTest, PerformAction) {
- ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
+ ASSERT_FALSE(Shell::Get()->window_selector_controller()->IsSelecting());
// Overview Mode only works when there is a window
std::unique_ptr<aura::Window> window(
@@ -106,7 +106,7 @@ TEST_F(OverviewButtonTrayTest, PerformAction) {
ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_TAP));
GetTray()->PerformAction(tap);
- EXPECT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting());
+ EXPECT_TRUE(Shell::Get()->window_selector_controller()->IsSelecting());
}
// Tests that tapping on the control will record the user action Tray_Overview.
@@ -115,7 +115,7 @@ TEST_F(OverviewButtonTrayTest, TrayOverviewUserAction) {
if (WmShell::Get()->IsRunningInMash())
return;
- ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
+ ASSERT_FALSE(Shell::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.
@@ -123,7 +123,7 @@ TEST_F(OverviewButtonTrayTest, TrayOverviewUserAction) {
ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
ui::GestureEventDetails(ui::ET_GESTURE_TAP));
GetTray()->PerformAction(tap);
- ASSERT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
+ ASSERT_FALSE(Shell::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,13 +131,13 @@ TEST_F(OverviewButtonTrayTest, TrayOverviewUserAction) {
std::unique_ptr<aura::Window> window(
CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
GetTray()->PerformAction(tap);
- ASSERT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting());
+ ASSERT_TRUE(Shell::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(WmShell::Get()->window_selector_controller()->IsSelecting());
+ ASSERT_FALSE(Shell::Get()->window_selector_controller()->IsSelecting());
EXPECT_EQ(3, user_action_tester.GetActionCount(kTrayOverview));
}
@@ -192,19 +192,19 @@ 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(WmShell::Get()->window_selector_controller()->IsSelecting());
+ ASSERT_FALSE(Shell::Get()->window_selector_controller()->IsSelecting());
ASSERT_FALSE(GetTray()->is_active());
// Overview Mode only works when there is a window
std::unique_ptr<aura::Window> window(
CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
- EXPECT_TRUE(WmShell::Get()->window_selector_controller()->ToggleOverview());
- EXPECT_TRUE(WmShell::Get()->window_selector_controller()->IsSelecting());
+ EXPECT_TRUE(Shell::Get()->window_selector_controller()->ToggleOverview());
+ EXPECT_TRUE(Shell::Get()->window_selector_controller()->IsSelecting());
EXPECT_TRUE(GetTray()->is_active());
- EXPECT_TRUE(WmShell::Get()->window_selector_controller()->ToggleOverview());
- EXPECT_FALSE(WmShell::Get()->window_selector_controller()->IsSelecting());
+ EXPECT_TRUE(Shell::Get()->window_selector_controller()->ToggleOverview());
+ EXPECT_FALSE(Shell::Get()->window_selector_controller()->IsSelecting());
EXPECT_FALSE(GetTray()->is_active());
}
« no previous file with comments | « ash/system/chromeos/power/power_event_observer.cc ('k') | ash/virtual_keyboard_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698