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

Unified Diff: ash/display/mirror_window_controller_unittest.cc

Issue 2400553002: ash: Remove broken display notification suppression when settings is open (Closed)
Patch Set: fix tests Created 4 years, 2 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/mirror_window_controller_unittest.cc
diff --git a/ash/display/mirror_window_controller_unittest.cc b/ash/display/mirror_window_controller_unittest.cc
index 9266cbb664077aeeef5f3367a947fa8bd14adbef..750536d89f5015b6572188a697b7995316443d82 100644
--- a/ash/display/mirror_window_controller_unittest.cc
+++ b/ash/display/mirror_window_controller_unittest.cc
@@ -211,7 +211,9 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorMoveOnEnter) {
WindowTreeHostManager* window_tree_host_manager =
shell->window_tree_host_manager();
- UpdateDisplay("400x400*2/r,400x400");
+ // Ensure the display is large enough that the cursor does not appear on top
+ // of the display change notifications (which changes the cursor to a hand).
+ UpdateDisplay("600x400*2/r,600x400");
int64_t primary_display_id = window_tree_host_manager->GetPrimaryDisplayId();
int64_t secondary_display_id = display_manager()->GetSecondaryDisplay().id();
test::ScopedSetInternalDisplayId set_internal(display_manager(),
@@ -229,23 +231,25 @@ TEST_F(MirrorWindowControllerTest, MAYBE_MirrorCursorMoveOnEnter) {
cursor_test_api.GetCurrentCursorRotation());
display_manager()->SetMultiDisplayMode(DisplayManager::MIRRORING);
- UpdateDisplay("400x400*2/r,400x400");
+ UpdateDisplay("600x400*2/r,600x400");
// Entering mirror mode should have centered the cursor on the primary display
// because the cursor's previous position is out of bounds.
// Check real cursor's position and properties.
- EXPECT_EQ("100,100", env->last_mouse_location().ToString());
+ EXPECT_EQ("100,150", env->last_mouse_location().ToString());
EXPECT_EQ(2.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
EXPECT_EQ(display::Display::ROTATE_90,
cursor_test_api.GetCurrentCursorRotation());
// Check mirrored cursor's location.
test::MirrorWindowTestApi test_api;
+ // The hot point location depends on the specific cursor.
+ EXPECT_EQ(ui::kCursorNull, test_api.GetCurrentCursorType());
// Rotated hot point must be (25-7, 7).
EXPECT_EQ("18,7", test_api.GetCursorHotPoint().ToString());
- // New coordinates are not (200,200) because (200,200) is not the center of
+ // New coordinates are not (300,200) because (300,200) is not the center of
// the display.
- EXPECT_EQ("199,200",
+ EXPECT_EQ("299,200",
test_api.GetCursorHotPointLocationInRootWindow().ToString());
}

Powered by Google App Engine
This is Rietveld 408576698