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

Unified Diff: ash/display/root_window_transformers_unittest.cc

Issue 1071353003: Prevent DisplayPreferences from saving incorrect rotations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/display/root_window_transformers_unittest.cc
diff --git a/ash/display/root_window_transformers_unittest.cc b/ash/display/root_window_transformers_unittest.cc
index 17c8b36310e3d59d67d6be122950ccd361f4370f..aea891fcdff0d09326d090206f7aa9604b7aa9f5 100644
--- a/ash/display/root_window_transformers_unittest.cc
+++ b/ash/display/root_window_transformers_unittest.cc
@@ -108,7 +108,8 @@ class TestEventHandler : public ui::EventHandler {
};
gfx::Display::Rotation GetStoredRotation(int64 id) {
- return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).rotation();
+ return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).Rotation(
+ gfx::Display::ROTATION_SOURCE_ACTIVE);
}
float GetStoredUIScale(int64 id) {
@@ -162,8 +163,8 @@ TEST_F(RootWindowTransformersTest, MAYBE_RotateAndMagnify) {
EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id));
magnifier->SetEnabled(false);
- display_manager->SetDisplayRotation(display1.id(),
- gfx::Display::ROTATE_90);
+ display_manager->SetDisplayRotation(display1.id(), gfx::Display::ROTATE_90,
+ gfx::Display::ROTATION_SOURCE_ACTIVE);
// Move the cursor to the center of the first root window.
generator1.MoveMouseToInHost(59, 100);
@@ -186,8 +187,8 @@ TEST_F(RootWindowTransformersTest, MAYBE_RotateAndMagnify) {
EXPECT_EQ("50,120 150x200",
ScreenUtil::GetSecondaryDisplay().bounds().ToString());
- display_manager->SetDisplayRotation(display2_id,
- gfx::Display::ROTATE_270);
+ display_manager->SetDisplayRotation(display2_id, gfx::Display::ROTATE_270,
+ gfx::Display::ROTATION_SOURCE_ACTIVE);
// Move the cursor to the center of the second root window.
generator2.MoveMouseToInHost(151, 199);
@@ -204,8 +205,8 @@ TEST_F(RootWindowTransformersTest, MAYBE_RotateAndMagnify) {
EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id));
magnifier->SetEnabled(false);
- display_manager->SetDisplayRotation(display1.id(),
- gfx::Display::ROTATE_180);
+ display_manager->SetDisplayRotation(display1.id(), gfx::Display::ROTATE_180,
+ gfx::Display::ROTATION_SOURCE_ACTIVE);
// Move the cursor to the center of the first root window.
generator1.MoveMouseToInHost(59, 99);

Powered by Google App Engine
This is Rietveld 408576698