OLD | NEW |
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // Move the cursor to the center of the second root window. | 196 // Move the cursor to the center of the second root window. |
197 generator2.MoveMouseToInHost(151, 199); | 197 generator2.MoveMouseToInHost(151, 199); |
198 | 198 |
199 magnifier->SetEnabled(true); | 199 magnifier->SetEnabled(true); |
200 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString()); | 200 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString()); |
201 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString()); | 201 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString()); |
202 EXPECT_EQ("50,120 200x150", | 202 EXPECT_EQ("50,120 200x150", |
203 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); | 203 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); |
204 generator2.MoveMouseToInHost(172, 219); | 204 generator2.MoveMouseToInHost(172, 219); |
205 EXPECT_EQ("95,80", event_handler.GetLocationAndReset()); | 205 EXPECT_EQ("95,80", event_handler.GetLocationAndReset()); |
206 EXPECT_EQ("169,175", | 206 EXPECT_EQ("145,200", |
207 aura::Env::GetInstance()->last_mouse_location().ToString()); | 207 aura::Env::GetInstance()->last_mouse_location().ToString()); |
208 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id())); | 208 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id())); |
209 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id)); | 209 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id)); |
210 magnifier->SetEnabled(false); | 210 magnifier->SetEnabled(false); |
211 | 211 |
212 display_manager->SetDisplayRotation(display1.id(), | 212 display_manager->SetDisplayRotation(display1.id(), |
213 gfx::Display::ROTATE_180); | 213 gfx::Display::ROTATE_180); |
214 // Move the cursor to the center of the first root window. | 214 // Move the cursor to the center of the first root window. |
215 generator1.MoveMouseToInHost(59, 99); | 215 generator1.MoveMouseToInHost(59, 99); |
216 | 216 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
389 EXPECT_EQ("159,99", event_handler.GetLocationAndReset()); | 389 EXPECT_EQ("159,99", event_handler.GetLocationAndReset()); |
390 | 390 |
391 magnifier->SetEnabled(false); | 391 magnifier->SetEnabled(false); |
392 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); | 392 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); |
393 | 393 |
394 Shell::GetInstance()->RemovePreTargetHandler(&event_handler); | 394 Shell::GetInstance()->RemovePreTargetHandler(&event_handler); |
395 } | 395 } |
396 | 396 |
397 } // namespace test | 397 } // namespace test |
398 } // namespace ash | 398 } // namespace ash |
OLD | NEW |