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

Unified Diff: ash/system/chromeos/brightness/tray_brightness_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
Index: ash/system/chromeos/brightness/tray_brightness_unittest.cc
diff --git a/ash/system/chromeos/brightness/tray_brightness_unittest.cc b/ash/system/chromeos/brightness/tray_brightness_unittest.cc
index 9f641db5ba54c45b3710dc22c72477aca7124b25..00c290f5808dcbee3353bc85507956b2fd917966 100644
--- a/ash/system/chromeos/brightness/tray_brightness_unittest.cc
+++ b/ash/system/chromeos/brightness/tray_brightness_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/system/tray/system_tray_item.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 "ui/views/view.h"
namespace ash {
@@ -45,19 +46,23 @@ TEST_F(TrayBrightnessTest, CreateDefaultView) {
// Tests the construction of the default view while MaximizeMode is active.
// The BrightnessView should be visible.
TEST_F(TrayBrightnessTest, CreateDefaultViewDuringMaximizeMode) {
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
scoped_ptr<views::View> tray(CreateDefaultView());
EXPECT_TRUE(tray->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
}
// Tests that the enabling of MaximizeMode affects a previously created
// BrightnessView, changing the visibility.
TEST_F(TrayBrightnessTest, DefaultViewVisibilityChangesDuringMaximizeMode) {
scoped_ptr<views::View> tray(CreateDefaultView());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
EXPECT_TRUE(tray->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
EXPECT_FALSE(tray->visible());
}
@@ -72,19 +77,23 @@ TEST_F(TrayBrightnessTest, CreateDetailedView) {
// Tests that when the detailed view is created during MaximizeMode that its
// BrightnessView is visible.
TEST_F(TrayBrightnessTest, CreateDetailedViewDuringMaximizeMode) {
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
scoped_ptr<views::View> tray(CreateDetailedView());
EXPECT_TRUE(tray->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
}
// Tests that the enabling of MaximizeMode has no affect on the visibility of a
// previously created BrightnessView that belongs to a detailed view.
TEST_F(TrayBrightnessTest, DetailedViewVisibilityChangesDuringMaximizeMode) {
scoped_ptr<views::View> tray(CreateDetailedView());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(true);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(true);
EXPECT_TRUE(tray->visible());
- Shell::GetInstance()->EnableMaximizeModeWindowManager(false);
+ Shell::GetInstance()->maximize_mode_controller()->
+ EnableMaximizeModeWindowManager(false);
EXPECT_TRUE(tray->visible());
}
« no previous file with comments | « ash/system/chromeos/brightness/tray_brightness.cc ('k') | ash/system/chromeos/rotation/tray_rotation_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698