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

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

Issue 759063002: Move Screen Rotation from MaximizeModeController to ScreenOrientationController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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/rotation/tray_rotation_lock_unittest.cc
diff --git a/ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc b/ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc
index c043a065e148c8c7f266a4a5129a40e5f4a9b203..5a04e2e41e986ad8a34aab9d6d4354c9be75fc2a 100644
--- a/ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc
+++ b/ash/system/chromeos/rotation/tray_rotation_lock_unittest.cc
@@ -5,6 +5,7 @@
#include "ash/system/chromeos/rotation/tray_rotation_lock.h"
#include "ash/ash_switches.h"
+#include "ash/content/display/screen_orientation_delegate_chromeos.h"
#include "ash/display/display_manager.h"
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf_widget.h"
@@ -118,7 +119,7 @@ TEST_F(TrayRotationLockTest, CreateTrayViewDuringMaximizeModeAndRotationLock) {
TearDownViews();
Shell::GetInstance()->maximize_mode_controller()->
EnableMaximizeModeWindowManager(true);
- Shell::GetInstance()-> maximize_mode_controller()->SetRotationLocked(true);
+ Shell::GetInstance()->screen_orientation_delegate()->SetRotationLocked(true);
SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget());
EXPECT_TRUE(tray_view()->visible());
Shell::GetInstance()->maximize_mode_controller()->
@@ -132,7 +133,7 @@ TEST_F(TrayRotationLockTest, TrayViewVisibilityChangesDuringMaximizeMode) {
ASSERT_FALSE(tray_view()->visible());
Shell::GetInstance()->maximize_mode_controller()->
EnableMaximizeModeWindowManager(true);
- Shell::GetInstance()->maximize_mode_controller()->SetRotationLocked(true);
+ Shell::GetInstance()->screen_orientation_delegate()->SetRotationLocked(true);
EXPECT_TRUE(tray_view()->visible());
Shell::GetInstance()->maximize_mode_controller()->
EnableMaximizeModeWindowManager(false);
@@ -204,19 +205,19 @@ TEST_F(TrayRotationLockTest, CreateSecondaryDefaultView) {
TEST_F(TrayRotationLockTest, PerformActionOnDefaultView) {
MaximizeModeController* maximize_mode_controller = Shell::GetInstance()->
maximize_mode_controller();
- ASSERT_FALSE(maximize_mode_controller->rotation_locked());
- Shell::GetInstance()->maximize_mode_controller()->
- EnableMaximizeModeWindowManager(true);
+ ScreenOrientationDelegate* screen_orientation_delegate =
+ Shell::GetInstance()->screen_orientation_delegate();
+ ASSERT_FALSE(screen_orientation_delegate->rotation_locked());
+ maximize_mode_controller->EnableMaximizeModeWindowManager(true);
ASSERT_FALSE(tray_view()->visible());
ui::GestureEvent tap(
0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP));
default_view()->OnGestureEvent(&tap);
- EXPECT_TRUE(maximize_mode_controller->rotation_locked());
+ EXPECT_TRUE(screen_orientation_delegate->rotation_locked());
EXPECT_TRUE(tray_view()->visible());
- Shell::GetInstance()->maximize_mode_controller()->
- EnableMaximizeModeWindowManager(false);
+ maximize_mode_controller->EnableMaximizeModeWindowManager(false);
}
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698