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

Side by Side Diff: ash/ash_root_window_transformer_unittest.cc

Issue 14466005: Magnifier: Prevent the cursor jumping on HiDPI display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
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/ash_root_window_transformer.h" 5 #include"ash/ash_root_window_transformer.h"
6 6
7 #include "ash/display/display_controller.h" 7 #include "ash/display/display_controller.h"
8 #include "ash/display/display_info.h" 8 #include "ash/display/display_info.h"
9 #include "ash/display/display_manager.h" 9 #include "ash/display/display_manager.h"
10 #include "ash/launcher/launcher.h" 10 #include "ash/launcher/launcher.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 // Move the cursor to the center of the second root window. 204 // Move the cursor to the center of the second root window.
205 generator2.MoveMouseTo(151, 199); 205 generator2.MoveMouseTo(151, 199);
206 206
207 magnifier->SetEnabled(true); 207 magnifier->SetEnabled(true);
208 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString()); 208 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString());
209 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString()); 209 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString());
210 EXPECT_EQ("50,120 200x150", 210 EXPECT_EQ("50,120 200x150",
211 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); 211 ScreenAsh::GetSecondaryDisplay().bounds().ToString());
212 generator2.MoveMouseTo(172, 219); 212 generator2.MoveMouseTo(172, 219);
213 EXPECT_EQ("95,80", event_handler.GetLocationAndReset()); 213 EXPECT_EQ("95,80", event_handler.GetLocationAndReset());
214 EXPECT_EQ("169,175", 214 EXPECT_EQ("145,200",
oshima 2013/04/30 23:03:07 Can you wait until this is landed? https://codere
oshima 2013/05/03 09:24:26 Its landed. can you update the patch?
yoshiki 2013/05/03 14:37:11 Done. Thanks!
215 aura::Env::GetInstance()->last_mouse_location().ToString()); 215 aura::Env::GetInstance()->last_mouse_location().ToString());
216 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id())); 216 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id()));
217 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id)); 217 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id));
218 magnifier->SetEnabled(false); 218 magnifier->SetEnabled(false);
219 219
220 display_manager->SetDisplayRotation(display1.id(), 220 display_manager->SetDisplayRotation(display1.id(),
221 gfx::Display::ROTATE_180); 221 gfx::Display::ROTATE_180);
222 // Move the cursor to the center of the first root window. 222 // Move the cursor to the center of the first root window.
223 generator1.MoveMouseTo(59, 99); 223 generator1.MoveMouseTo(59, 99);
224 224
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 EXPECT_EQ("159,99", event_handler.GetLocationAndReset()); 396 EXPECT_EQ("159,99", event_handler.GetLocationAndReset());
397 397
398 magnifier->SetEnabled(false); 398 magnifier->SetEnabled(false);
399 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); 399 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale());
400 400
401 Shell::GetInstance()->RemovePreTargetHandler(&event_handler); 401 Shell::GetInstance()->RemovePreTargetHandler(&event_handler);
402 } 402 }
403 403
404 } // namespace test 404 } // namespace test
405 } // namespace ash 405 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/magnifier/magnification_controller.cc » ('j') | ash/magnifier/magnification_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698