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

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

Issue 308683002: Move MaximizeModeWindowManager to the controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 6 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/overview/overview_button_tray.cc ('k') | ash/test/shell_test_api.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 bc3fd695031be4bc6dbe61263f6e00725c0ed365..0bf495c6bf22faa849c3936319b9d80387155685 100644
--- a/ash/system/overview/overview_button_tray_unittest.cc
+++ b/ash/system/overview/overview_button_tray_unittest.cc
@@ -13,6 +13,7 @@
#include "ash/system/user/login_status.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/status_area_widget_test_helper.h"
+#include "ash/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/wm/overview/window_selector_controller.h"
#include "base/time/time.h"
#include "ui/events/event.h"
@@ -60,10 +61,12 @@ TEST_F(OverviewButtonTrayTest, BasicConstruction) {
// By default the system should not have MaximizeMode enabled.
TEST_F(OverviewButtonTrayTest, MaximizeModeObserverOnMaximizeModeToggled) {
ASSERT_FALSE(GetTray()->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
EXPECT_TRUE(GetTray()->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
EXPECT_FALSE(GetTray()->visible());
}
@@ -92,10 +95,12 @@ TEST_F(OverviewButtonTrayTest, DisplaysOnBothDisplays) {
UpdateDisplay("400x400,200x200");
EXPECT_FALSE(GetTray()->visible());
EXPECT_FALSE(GetSecondaryTray()->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
EXPECT_TRUE(GetTray()->visible());
EXPECT_TRUE(GetSecondaryTray()->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
}
// Tests if Maximize Mode is enabled before a secondary display is attached
@@ -104,16 +109,19 @@ TEST_F(OverviewButtonTrayTest, SecondaryTrayCreatedVisible) {
if (!SupportsMultipleDisplays())
return;
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
UpdateDisplay("400x400,200x200");
EXPECT_TRUE(GetSecondaryTray()->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
}
// Tests that the tray loses visibility when a user logs out, and that it
// regains visibility when a user logs back in.
TEST_F(OverviewButtonTrayTest, VisibilityChangesForLoginStatus) {
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
SetUserLoggedIn(false);
Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_NONE);
EXPECT_FALSE(GetTray()->visible());
@@ -121,7 +129,8 @@ TEST_F(OverviewButtonTrayTest, VisibilityChangesForLoginStatus) {
SetSessionStarted(true);
Shell::GetInstance()->UpdateAfterLoginStatusChange(user::LOGGED_IN_USER);
EXPECT_TRUE(GetTray()->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
}
} // namespace ash
« no previous file with comments | « ash/system/overview/overview_button_tray.cc ('k') | ash/test/shell_test_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698