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

Unified Diff: ash/content/display/screen_orientation_controller_chromeos_unittest.cc

Issue 2951773002: Don't lock and save the orientation change made not through ScreenOrientationController (Closed)
Patch Set: removed tests that no longer makes sense Created 3 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 | « no previous file | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/content/display/screen_orientation_controller_chromeos_unittest.cc
diff --git a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
index 8a708ec586f37610a176fe2f1842ed48a1e52d20..f7336f85bc05994fed3683596cce94d23f99d6f5 100644
--- a/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
+++ b/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
@@ -510,16 +510,6 @@ TEST_F(ScreenOrientationControllerTest, ResetUserRotationUponExit) {
EXPECT_EQ(display::Display::ROTATE_90, GetCurrentInternalDisplayRotation());
}
-// Tests that if a user sets a display rotation that accelerometer rotation
-// becomes locked.
-TEST_F(ScreenOrientationControllerTest,
- NonAccelerometerRotationChangesLockRotation) {
- EnableMaximizeMode(true);
- ASSERT_FALSE(RotationLocked());
- SetInternalDisplayRotation(display::Display::ROTATE_270);
- EXPECT_TRUE(RotationLocked());
-}
-
// Tests that if a user changes the display rotation, while rotation is locked,
// that the updates are recorded. Upon exiting maximize mode the latest user
// rotation should be applied.
@@ -621,33 +611,6 @@ TEST_F(ScreenOrientationControllerTest, UserRotationLockDisallowsRotation) {
EXPECT_EQ(display::Display::ROTATE_0, GetCurrentInternalDisplayRotation());
}
-// Tests that when MaximizeMode is triggered before the internal display is
-// ready, that ScreenOrientationController still begins listening to events,
-// which require an internal display to be acted upon.
-TEST_F(ScreenOrientationControllerTest, InternalDisplayNotAvailableAtStartup) {
- display::test::DisplayManagerTestApi(display_manager())
- .SetFirstDisplayAsInternalDisplay();
-
- int64_t internal_display_id = display::Display::InternalDisplayId();
- display::Display::SetInternalDisplayId(display::kInvalidDisplayId);
-
- EnableMaximizeMode(true);
-
- // Should not crash, even though there is no internal display.
- SetDisplayRotationById(internal_display_id, display::Display::ROTATE_180);
- EXPECT_FALSE(RotationLocked());
-
- // Should not crash, even though the invalid display id is requested.
- SetDisplayRotationById(display::kInvalidDisplayId,
- display::Display::ROTATE_180);
- EXPECT_FALSE(RotationLocked());
-
- // With an internal display now available, functionality should resume.
- display::Display::SetInternalDisplayId(internal_display_id);
- SetInternalDisplayRotation(display::Display::ROTATE_90);
- EXPECT_TRUE(RotationLocked());
-}
-
// Verifies rotating an inactive Display is successful.
TEST_F(ScreenOrientationControllerTest, RotateInactiveDisplay) {
const int64_t kInternalDisplayId = 9;
« no previous file with comments | « no previous file | ash/display/display_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698