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

Side by Side Diff: ash/display/mirror_window_controller_unittest.cc

Issue 2055273004: Remove unused variables, ash/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/display/mirror_window_controller.h" 5 #include "ash/display/mirror_window_controller.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/display/display_manager.h" 8 #include "ash/display/display_manager.h"
9 #include "ash/display/window_tree_host_manager.h" 9 #include "ash/display/window_tree_host_manager.h"
10 #include "ash/screen_util.h" 10 #include "ash/screen_util.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 // Entering mirror mode should have centered the cursor on the primary display 236 // Entering mirror mode should have centered the cursor on the primary display
237 // because the cursor's previous position is out of bounds. 237 // because the cursor's previous position is out of bounds.
238 // Check real cursor's position and properties. 238 // Check real cursor's position and properties.
239 EXPECT_EQ("100,100", env->last_mouse_location().ToString()); 239 EXPECT_EQ("100,100", env->last_mouse_location().ToString());
240 EXPECT_EQ(2.0f, cursor_test_api.GetCurrentCursor().device_scale_factor()); 240 EXPECT_EQ(2.0f, cursor_test_api.GetCurrentCursor().device_scale_factor());
241 EXPECT_EQ(display::Display::ROTATE_90, 241 EXPECT_EQ(display::Display::ROTATE_90,
242 cursor_test_api.GetCurrentCursorRotation()); 242 cursor_test_api.GetCurrentCursorRotation());
243 243
244 // Check mirrored cursor's location. 244 // Check mirrored cursor's location.
245 test::MirrorWindowTestApi test_api; 245 test::MirrorWindowTestApi test_api;
246 gfx::Point hot_point = test_api.GetCursorHotPoint();
247 // Rotated hot point must be (25-7, 7). 246 // Rotated hot point must be (25-7, 7).
248 EXPECT_EQ("18,7", test_api.GetCursorHotPoint().ToString()); 247 EXPECT_EQ("18,7", test_api.GetCursorHotPoint().ToString());
249 // New coordinates are not (200,200) because (200,200) is not the center of 248 // New coordinates are not (200,200) because (200,200) is not the center of
250 // the display. 249 // the display.
251 EXPECT_EQ("199,200", 250 EXPECT_EQ("199,200",
252 test_api.GetCursorHotPointLocationInRootWindow().ToString()); 251 test_api.GetCursorHotPointLocationInRootWindow().ToString());
253 } 252 }
254 253
255 // Make sure that the compositor based mirroring can switch 254 // Make sure that the compositor based mirroring can switch
256 // from/to dock mode. 255 // from/to dock mode.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 299
301 TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) { 300 TEST_F(MirrorOnBootTest, MAYBE_MirrorOnBoot) {
302 DisplayManager* display_manager = Shell::GetInstance()->display_manager(); 301 DisplayManager* display_manager = Shell::GetInstance()->display_manager();
303 EXPECT_TRUE(display_manager->IsInMirrorMode()); 302 EXPECT_TRUE(display_manager->IsInMirrorMode());
304 RunAllPendingInMessageLoop(); 303 RunAllPendingInMessageLoop();
305 test::MirrorWindowTestApi test_api; 304 test::MirrorWindowTestApi test_api;
306 EXPECT_TRUE(test_api.GetHost()); 305 EXPECT_TRUE(test_api.GetHost());
307 } 306 }
308 307
309 } // namespace ash 308 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/dock/docked_window_layout_manager.cc ('k') | ash/drag_drop/drag_drop_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698