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

Unified Diff: ash/system/rotation/tray_rotation_lock_unittest.cc

Issue 2906803002: Rename MaximizeMode to TabletMode (Closed)
Patch Set: updated filter Created 3 years, 7 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/rotation/tray_rotation_lock_unittest.cc
diff --git a/ash/system/rotation/tray_rotation_lock_unittest.cc b/ash/system/rotation/tray_rotation_lock_unittest.cc
index 4101e2508bada88b4349422efc0038d597d1ac19..703b678400c0cd02c5237975e331966451d97ebe 100644
--- a/ash/system/rotation/tray_rotation_lock_unittest.cc
+++ b/ash/system/rotation/tray_rotation_lock_unittest.cc
@@ -14,7 +14,7 @@
#include "ash/system/tray/system_tray_delegate.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/tablet_mode/tablet_mode_controller.h"
#include "base/command_line.h"
#include "base/time/time.h"
#include "ui/display/display_switches.h"
@@ -114,45 +114,39 @@ TEST_F(TrayRotationLockTest, CreateTrayView) {
EXPECT_FALSE(tray_view()->visible());
}
-// Tests that when the tray view is created, while MaximizeMode is active, that
-// it must be visible, and becomes invisible exiting MaximizeMode.
-TEST_F(TrayRotationLockTest, CreateTrayViewDuringMaximizeMode) {
+// Tests that when the tray view is created, while TabletMode is active, that
+// it must be visible, and becomes invisible exiting TabletMode.
+TEST_F(TrayRotationLockTest, CreateTrayViewDuringTabletMode) {
TearDownViews();
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- true);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget());
EXPECT_TRUE(tray_view()->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- false);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(false);
EXPECT_FALSE(tray_view()->visible());
}
-// Tests that the enabling of MaximizeMode affects a previously created tray
+// Tests that the enabling of TabletMode affects a previously created tray
// view, changing the visibility.
-TEST_F(TrayRotationLockTest, TrayViewVisibilityChangesDuringMaximizeMode) {
+TEST_F(TrayRotationLockTest, TrayViewVisibilityChangesDuringTabletMode) {
ASSERT_FALSE(tray_view()->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- true);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
Shell::Get()->screen_orientation_controller()->ToggleUserRotationLock();
EXPECT_TRUE(tray_view()->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- false);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(false);
EXPECT_FALSE(tray_view()->visible());
}
// Tests that when the tray view is created for a secondary display, that it is
-// not visible, and that MaximizeMode does not affect visibility.
+// not visible, and that TabletMode does not affect visibility.
TEST_F(TrayRotationLockTest, CreateSecondaryTrayView) {
UpdateDisplay("400x400,200x200");
SetUpForStatusAreaWidget(
StatusAreaWidgetTestHelper::GetSecondaryStatusAreaWidget());
EXPECT_FALSE(tray_view()->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- true);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
EXPECT_FALSE(tray_view()->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- false);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(false);
EXPECT_FALSE(tray_view()->visible());
}
@@ -162,27 +156,23 @@ TEST_F(TrayRotationLockTest, CreateDefaultView) {
EXPECT_FALSE(default_view()->visible());
}
-// Tests that when the default view is created, while MaximizeMode is active,
+// Tests that when the default view is created, while TabletMode is active,
// that it is visible.
-TEST_F(TrayRotationLockTest, CreateDefaultViewDuringMaximizeMode) {
+TEST_F(TrayRotationLockTest, CreateDefaultViewDuringTabletMode) {
TearDownViews();
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- true);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget());
EXPECT_TRUE(default_view()->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- false);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(false);
EXPECT_FALSE(default_view()->visible());
}
-// Tests that the enabling of MaximizeMode affects a previously created default
+// Tests that the enabling of TabletMode affects a previously created default
// view, changing the visibility.
-TEST_F(TrayRotationLockTest, DefaultViewVisibilityChangesDuringMaximizeMode) {
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- true);
+TEST_F(TrayRotationLockTest, DefaultViewVisibilityChangesDuringTabletMode) {
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
EXPECT_TRUE(default_view()->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- false);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(false);
EXPECT_FALSE(default_view()->visible());
}
@@ -200,12 +190,12 @@ TEST_F(TrayRotationLockTest, CreateSecondaryDefaultView) {
// Tests that activating the default view causes the display to have its
// rotation locked.
TEST_F(TrayRotationLockTest, PerformActionOnDefaultView) {
- MaximizeModeController* maximize_mode_controller =
- Shell::Get()->maximize_mode_controller();
+ TabletModeController* tablet_mode_controller =
+ Shell::Get()->tablet_mode_controller();
ScreenOrientationController* screen_orientation_controller =
Shell::Get()->screen_orientation_controller();
ASSERT_FALSE(screen_orientation_controller->rotation_locked());
- maximize_mode_controller->EnableMaximizeModeWindowManager(true);
+ tablet_mode_controller->EnableTabletModeWindowManager(true);
ASSERT_TRUE(tray_view()->visible());
ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
@@ -214,7 +204,7 @@ TEST_F(TrayRotationLockTest, PerformActionOnDefaultView) {
EXPECT_TRUE(screen_orientation_controller->rotation_locked());
EXPECT_TRUE(tray_view()->visible());
- maximize_mode_controller->EnableMaximizeModeWindowManager(false);
+ tablet_mode_controller->EnableTabletModeWindowManager(false);
}
// Tests that when the tray is created without the internal display being known,
@@ -232,22 +222,18 @@ TEST_F(TrayRotationLockTest, InternalDisplayNotAvailableAtCreation) {
std::unique_ptr<views::View> default_view(tray->CreateDefaultView(
StatusAreaWidgetTestHelper::GetUserLoginStatus()));
EXPECT_TRUE(default_view);
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- true);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
EXPECT_TRUE(default_view->visible());
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- false);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(false);
}
// Tests that when the tray view is deleted, while TrayRotationLock has not been
// deleted, that updates to the rotation lock state do not crash.
TEST_F(TrayRotationLockTest, LockUpdatedDuringDesctruction) {
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- true);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(true);
DestroyTrayView();
Shell::Get()->screen_orientation_controller()->ToggleUserRotationLock();
- Shell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager(
- false);
+ Shell::Get()->tablet_mode_controller()->EnableTabletModeWindowManager(false);
}
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698