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

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: Fix Linux Compile Created 5 years, 11 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/rotation/tray_rotation_lock.cc ('k') | ash/system/chromeos/tray_display.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..246772d8d0bf8803ae5476f9db6f3d137ef1975a 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_controller_chromeos.h"
#include "ash/display/display_manager.h"
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf_widget.h"
@@ -53,8 +54,8 @@ class TrayRotationLockTest : public test::AshTestBase {
void TearDownViews();
// test::AshTestBase:
- virtual void SetUp() override;
- virtual void TearDown() override;
+ void SetUp() override;
+ void TearDown() override;
private:
scoped_ptr<TrayRotationLock> tray_;
@@ -118,7 +119,8 @@ TEST_F(TrayRotationLockTest, CreateTrayViewDuringMaximizeModeAndRotationLock) {
TearDownViews();
Shell::GetInstance()->maximize_mode_controller()->
EnableMaximizeModeWindowManager(true);
- Shell::GetInstance()-> maximize_mode_controller()->SetRotationLocked(true);
+ Shell::GetInstance()->screen_orientation_controller()->SetRotationLocked(
+ true);
SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget());
EXPECT_TRUE(tray_view()->visible());
Shell::GetInstance()->maximize_mode_controller()->
@@ -132,7 +134,8 @@ 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_controller()->SetRotationLocked(
+ true);
EXPECT_TRUE(tray_view()->visible());
Shell::GetInstance()->maximize_mode_controller()->
EnableMaximizeModeWindowManager(false);
@@ -204,19 +207,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);
+ ScreenOrientationController* screen_orientation_controller =
+ Shell::GetInstance()->screen_orientation_controller();
+ ASSERT_FALSE(screen_orientation_controller->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_controller->rotation_locked());
EXPECT_TRUE(tray_view()->visible());
- Shell::GetInstance()->maximize_mode_controller()->
- EnableMaximizeModeWindowManager(false);
+ maximize_mode_controller->EnableMaximizeModeWindowManager(false);
}
} // namespace ash
« no previous file with comments | « ash/system/chromeos/rotation/tray_rotation_lock.cc ('k') | ash/system/chromeos/tray_display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698