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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 }; | 108 }; |
109 | 109 |
110 gfx::Display::Rotation GetStoredRotation(int64 id) { | 110 gfx::Display::Rotation GetStoredRotation(int64 id) { |
111 return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).rotation(); | 111 return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).rotation(); |
112 } | 112 } |
113 | 113 |
114 float GetStoredUIScale(int64 id) { | 114 float GetStoredUIScale(int64 id) { |
115 return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).ui_scale(); | 115 return Shell::GetInstance()->display_manager()->GetDisplayInfo(id).ui_scale(); |
116 } | 116 } |
117 | 117 |
118 void MoveMouseToInHostCoord(aura::RootWindow* root_window, | |
119 int host_x, | |
120 int host_y) { | |
121 gfx::Point move_point(host_x, host_y); | |
122 ui::MouseEvent mouseev(ui::ET_MOUSE_MOVED, move_point, move_point, 0); | |
123 root_window->AsRootWindowHostDelegate()->OnHostMouseEvent(&mouseev); | |
124 } | |
125 | |
126 } // namespace | 118 } // namespace |
127 | 119 |
128 typedef test::AshTestBase AshRootWindowTransformerTest; | 120 typedef test::AshTestBase AshRootWindowTransformerTest; |
129 | 121 |
130 #if defined(OS_WIN) | 122 #if defined(OS_WIN) |
131 // On Win8 bots, the host window can't be resized and | 123 // On Win8 bots, the host window can't be resized and |
132 // SetTransform updates the window using the orignal host window | 124 // SetTransform updates the window using the orignal host window |
133 // size. | 125 // size. |
134 #define MAYBE_RotateAndMagnify DISABLED_RotateAndMagniy | 126 #define MAYBE_RotateAndMagnify DISABLED_RotateAndMagniy |
135 #define MAYBE_ScaleAndMagnify DISABLED_ScaleAndMagnify | 127 #define MAYBE_ScaleAndMagnify DISABLED_ScaleAndMagnify |
(...skipping 24 matching lines...) Expand all Loading... |
160 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 152 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
161 aura::test::EventGenerator generator1(root_windows[0]); | 153 aura::test::EventGenerator generator1(root_windows[0]); |
162 aura::test::EventGenerator generator2(root_windows[1]); | 154 aura::test::EventGenerator generator2(root_windows[1]); |
163 | 155 |
164 magnifier->SetEnabled(true); | 156 magnifier->SetEnabled(true); |
165 EXPECT_EQ(2.0f, magnifier->GetScale()); | 157 EXPECT_EQ(2.0f, magnifier->GetScale()); |
166 EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString()); | 158 EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString()); |
167 EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString()); | 159 EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString()); |
168 EXPECT_EQ("120,0 150x200", | 160 EXPECT_EQ("120,0 150x200", |
169 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); | 161 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); |
170 generator1.MoveMouseTo(40, 80); | 162 generator1.MoveMouseToInHost(40, 80); |
171 EXPECT_EQ("50,90", event_handler.GetLocationAndReset()); | 163 EXPECT_EQ("50,90", event_handler.GetLocationAndReset()); |
172 EXPECT_EQ("50,90", | 164 EXPECT_EQ("50,90", |
173 aura::Env::GetInstance()->last_mouse_location().ToString()); | 165 aura::Env::GetInstance()->last_mouse_location().ToString()); |
174 EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display1.id())); | 166 EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display1.id())); |
175 EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id)); | 167 EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id)); |
176 magnifier->SetEnabled(false); | 168 magnifier->SetEnabled(false); |
177 | 169 |
178 display_manager->SetDisplayRotation(display1.id(), | 170 display_manager->SetDisplayRotation(display1.id(), |
179 gfx::Display::ROTATE_90); | 171 gfx::Display::ROTATE_90); |
180 // Move the cursor to the center of the first root window. | 172 // Move the cursor to the center of the first root window. |
181 generator1.MoveMouseTo(59, 100); | 173 generator1.MoveMouseToInHost(59, 100); |
182 | 174 |
183 magnifier->SetEnabled(true); | 175 magnifier->SetEnabled(true); |
184 EXPECT_EQ(2.0f, magnifier->GetScale()); | 176 EXPECT_EQ(2.0f, magnifier->GetScale()); |
185 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString()); | 177 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString()); |
186 EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString()); | 178 EXPECT_EQ("150x200", root_windows[1]->bounds().size().ToString()); |
187 EXPECT_EQ("200,0 150x200", | 179 EXPECT_EQ("200,0 150x200", |
188 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); | 180 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); |
189 generator1.MoveMouseTo(39, 120); | 181 generator1.MoveMouseToInHost(39, 120); |
190 EXPECT_EQ("110,70", event_handler.GetLocationAndReset()); | 182 EXPECT_EQ("110,70", event_handler.GetLocationAndReset()); |
191 EXPECT_EQ("110,70", | 183 EXPECT_EQ("110,70", |
192 aura::Env::GetInstance()->last_mouse_location().ToString()); | 184 aura::Env::GetInstance()->last_mouse_location().ToString()); |
193 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id())); | 185 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id())); |
194 EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id)); | 186 EXPECT_EQ(gfx::Display::ROTATE_0, GetStoredRotation(display2_id)); |
195 magnifier->SetEnabled(false); | 187 magnifier->SetEnabled(false); |
196 | 188 |
197 DisplayLayout display_layout(DisplayLayout::BOTTOM, 50); | 189 DisplayLayout display_layout(DisplayLayout::BOTTOM, 50); |
198 display_controller->SetLayoutForCurrentDisplays(display_layout); | 190 display_controller->SetLayoutForCurrentDisplays(display_layout); |
199 EXPECT_EQ("50,120 150x200", | 191 EXPECT_EQ("50,120 150x200", |
200 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); | 192 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); |
201 | 193 |
202 display_manager->SetDisplayRotation(display2_id, | 194 display_manager->SetDisplayRotation(display2_id, |
203 gfx::Display::ROTATE_270); | 195 gfx::Display::ROTATE_270); |
204 // Move the cursor to the center of the second root window. | 196 // Move the cursor to the center of the second root window. |
205 generator2.MoveMouseTo(151, 199); | 197 generator2.MoveMouseToInHost(151, 199); |
206 | 198 |
207 magnifier->SetEnabled(true); | 199 magnifier->SetEnabled(true); |
208 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString()); | 200 EXPECT_EQ("200x120", root_windows[0]->bounds().size().ToString()); |
209 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString()); | 201 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString()); |
210 EXPECT_EQ("50,120 200x150", | 202 EXPECT_EQ("50,120 200x150", |
211 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); | 203 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); |
212 generator2.MoveMouseTo(172, 219); | 204 generator2.MoveMouseToInHost(172, 219); |
213 EXPECT_EQ("95,80", event_handler.GetLocationAndReset()); | 205 EXPECT_EQ("95,80", event_handler.GetLocationAndReset()); |
214 EXPECT_EQ("169,175", | 206 EXPECT_EQ("169,175", |
215 aura::Env::GetInstance()->last_mouse_location().ToString()); | 207 aura::Env::GetInstance()->last_mouse_location().ToString()); |
216 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id())); | 208 EXPECT_EQ(gfx::Display::ROTATE_90, GetStoredRotation(display1.id())); |
217 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id)); | 209 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id)); |
218 magnifier->SetEnabled(false); | 210 magnifier->SetEnabled(false); |
219 | 211 |
220 display_manager->SetDisplayRotation(display1.id(), | 212 display_manager->SetDisplayRotation(display1.id(), |
221 gfx::Display::ROTATE_180); | 213 gfx::Display::ROTATE_180); |
222 // Move the cursor to the center of the first root window. | 214 // Move the cursor to the center of the first root window. |
223 generator1.MoveMouseTo(59, 99); | 215 generator1.MoveMouseToInHost(59, 99); |
224 | 216 |
225 magnifier->SetEnabled(true); | 217 magnifier->SetEnabled(true); |
226 EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString()); | 218 EXPECT_EQ("120x200", root_windows[0]->bounds().size().ToString()); |
227 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString()); | 219 EXPECT_EQ("200x150", root_windows[1]->bounds().size().ToString()); |
228 // Dislay must share at least 100, so the x's offset becomes 20. | 220 // Dislay must share at least 100, so the x's offset becomes 20. |
229 EXPECT_EQ("20,200 200x150", | 221 EXPECT_EQ("20,200 200x150", |
230 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); | 222 ScreenAsh::GetSecondaryDisplay().bounds().ToString()); |
231 generator1.MoveMouseTo(39, 59); | 223 generator1.MoveMouseToInHost(39, 59); |
232 EXPECT_EQ("70,120", event_handler.GetLocationAndReset()); | 224 EXPECT_EQ("70,120", event_handler.GetLocationAndReset()); |
233 EXPECT_EQ(gfx::Display::ROTATE_180, GetStoredRotation(display1.id())); | 225 EXPECT_EQ(gfx::Display::ROTATE_180, GetStoredRotation(display1.id())); |
234 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id)); | 226 EXPECT_EQ(gfx::Display::ROTATE_270, GetStoredRotation(display2_id)); |
235 magnifier->SetEnabled(false); | 227 magnifier->SetEnabled(false); |
236 | 228 |
237 Shell::GetInstance()->RemovePreTargetHandler(&event_handler); | 229 Shell::GetInstance()->RemovePreTargetHandler(&event_handler); |
238 } | 230 } |
239 | 231 |
240 TEST_F(AshRootWindowTransformerTest, MAYBE_ScaleAndMagnify) { | 232 TEST_F(AshRootWindowTransformerTest, MAYBE_ScaleAndMagnify) { |
241 TestEventHandler event_handler; | 233 TestEventHandler event_handler; |
(...skipping 10 matching lines...) Expand all Loading... |
252 | 244 |
253 magnifier->SetEnabled(true); | 245 magnifier->SetEnabled(true); |
254 EXPECT_EQ(2.0f, magnifier->GetScale()); | 246 EXPECT_EQ(2.0f, magnifier->GetScale()); |
255 EXPECT_EQ("0,0 450x300", display1.bounds().ToString()); | 247 EXPECT_EQ("0,0 450x300", display1.bounds().ToString()); |
256 EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString()); | 248 EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString()); |
257 EXPECT_EQ("450,0 500x300", display2.bounds().ToString()); | 249 EXPECT_EQ("450,0 500x300", display2.bounds().ToString()); |
258 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); | 250 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); |
259 EXPECT_EQ(1.0f, GetStoredUIScale(display2.id())); | 251 EXPECT_EQ(1.0f, GetStoredUIScale(display2.id())); |
260 | 252 |
261 aura::test::EventGenerator generator(root_windows[0]); | 253 aura::test::EventGenerator generator(root_windows[0]); |
262 generator.MoveMouseTo(500, 200); | 254 generator.MoveMouseToInHost(500, 200); |
263 EXPECT_EQ("299,150", event_handler.GetLocationAndReset()); | 255 EXPECT_EQ("299,150", event_handler.GetLocationAndReset()); |
264 magnifier->SetEnabled(false); | 256 magnifier->SetEnabled(false); |
265 | 257 |
266 internal::DisplayManager* display_manager = | 258 internal::DisplayManager* display_manager = |
267 Shell::GetInstance()->display_manager(); | 259 Shell::GetInstance()->display_manager(); |
268 display_manager->SetDisplayUIScale(display1.id(), 1.25); | 260 display_manager->SetDisplayUIScale(display1.id(), 1.25); |
269 display1 = Shell::GetScreen()->GetPrimaryDisplay(); | 261 display1 = Shell::GetScreen()->GetPrimaryDisplay(); |
270 display2 = ScreenAsh::GetSecondaryDisplay(); | 262 display2 = ScreenAsh::GetSecondaryDisplay(); |
271 magnifier->SetEnabled(true); | 263 magnifier->SetEnabled(true); |
272 EXPECT_EQ(2.0f, magnifier->GetScale()); | 264 EXPECT_EQ(2.0f, magnifier->GetScale()); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 | 316 |
325 // Test 1 | 317 // Test 1 |
326 UpdateDisplay("600x400*2/r@1.5"); | 318 UpdateDisplay("600x400*2/r@1.5"); |
327 | 319 |
328 gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay(); | 320 gfx::Display display1 = Shell::GetScreen()->GetPrimaryDisplay(); |
329 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); | 321 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
330 EXPECT_EQ("0,0 300x450", display1.bounds().ToString()); | 322 EXPECT_EQ("0,0 300x450", display1.bounds().ToString()); |
331 EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString()); | 323 EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString()); |
332 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); | 324 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); |
333 | 325 |
334 MoveMouseToInHostCoord(root_windows[0], 300, 200); | 326 aura::test::EventGenerator generator(root_windows[0]); |
| 327 generator.MoveMouseToInHost(300, 200); |
335 magnifier->SetEnabled(true); | 328 magnifier->SetEnabled(true); |
336 EXPECT_EQ("150,224", event_handler.GetLocationAndReset()); | 329 EXPECT_EQ("150,224", event_handler.GetLocationAndReset()); |
337 EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale()); | 330 EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale()); |
338 | 331 |
339 MoveMouseToInHostCoord(root_windows[0], 300, 200); | 332 generator.MoveMouseToInHost(300, 200); |
340 EXPECT_EQ("150,224", event_handler.GetLocationAndReset()); | 333 EXPECT_EQ("150,224", event_handler.GetLocationAndReset()); |
341 MoveMouseToInHostCoord(root_windows[0], 200, 300); | 334 generator.MoveMouseToInHost(200, 300); |
342 EXPECT_EQ("187,261", event_handler.GetLocationAndReset()); | 335 EXPECT_EQ("187,261", event_handler.GetLocationAndReset()); |
343 MoveMouseToInHostCoord(root_windows[0], 100, 400); | 336 generator.MoveMouseToInHost(100, 400); |
344 EXPECT_EQ("237,299", event_handler.GetLocationAndReset()); | 337 EXPECT_EQ("237,299", event_handler.GetLocationAndReset()); |
345 MoveMouseToInHostCoord(root_windows[0], 0, 0); | 338 generator.MoveMouseToInHost(0, 0); |
346 EXPECT_EQ("137,348", event_handler.GetLocationAndReset()); | 339 EXPECT_EQ("137,348", event_handler.GetLocationAndReset()); |
347 | 340 |
348 magnifier->SetEnabled(false); | 341 magnifier->SetEnabled(false); |
349 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); | 342 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); |
350 | 343 |
351 // Test 2 | 344 // Test 2 |
352 UpdateDisplay("600x400*2/u@1.5"); | 345 UpdateDisplay("600x400*2/u@1.5"); |
353 display1 = Shell::GetScreen()->GetPrimaryDisplay(); | 346 display1 = Shell::GetScreen()->GetPrimaryDisplay(); |
354 root_windows = Shell::GetAllRootWindows(); | 347 root_windows = Shell::GetAllRootWindows(); |
355 EXPECT_EQ("0,0 450x300", display1.bounds().ToString()); | 348 EXPECT_EQ("0,0 450x300", display1.bounds().ToString()); |
356 EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString()); | 349 EXPECT_EQ("0,0 450x300", root_windows[0]->bounds().ToString()); |
357 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); | 350 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); |
358 | 351 |
359 MoveMouseToInHostCoord(root_windows[0], 300, 200); | 352 generator.MoveMouseToInHost(300, 200); |
360 magnifier->SetEnabled(true); | 353 magnifier->SetEnabled(true); |
361 EXPECT_EQ("224,149", event_handler.GetLocationAndReset()); | 354 EXPECT_EQ("224,149", event_handler.GetLocationAndReset()); |
362 EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale()); | 355 EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale()); |
363 | 356 |
364 MoveMouseToInHostCoord(root_windows[0], 300, 200); | 357 generator.MoveMouseToInHost(300, 200); |
365 EXPECT_EQ("224,148", event_handler.GetLocationAndReset()); | 358 EXPECT_EQ("224,148", event_handler.GetLocationAndReset()); |
366 MoveMouseToInHostCoord(root_windows[0], 200, 300); | 359 generator.MoveMouseToInHost(200, 300); |
367 EXPECT_EQ("261,111", event_handler.GetLocationAndReset()); | 360 EXPECT_EQ("261,111", event_handler.GetLocationAndReset()); |
368 MoveMouseToInHostCoord(root_windows[0], 100, 400); | 361 generator.MoveMouseToInHost(100, 400); |
369 EXPECT_EQ("299,60", event_handler.GetLocationAndReset()); | 362 EXPECT_EQ("299,60", event_handler.GetLocationAndReset()); |
370 MoveMouseToInHostCoord(root_windows[0], 0, 0); | 363 generator.MoveMouseToInHost(0, 0); |
371 EXPECT_EQ("348,159", event_handler.GetLocationAndReset()); | 364 EXPECT_EQ("348,159", event_handler.GetLocationAndReset()); |
372 | 365 |
373 magnifier->SetEnabled(false); | 366 magnifier->SetEnabled(false); |
374 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); | 367 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); |
375 | 368 |
376 // Test 3 | 369 // Test 3 |
377 UpdateDisplay("600x400*2/l@1.5"); | 370 UpdateDisplay("600x400*2/l@1.5"); |
378 display1 = Shell::GetScreen()->GetPrimaryDisplay(); | 371 display1 = Shell::GetScreen()->GetPrimaryDisplay(); |
379 root_windows = Shell::GetAllRootWindows(); | 372 root_windows = Shell::GetAllRootWindows(); |
380 EXPECT_EQ("0,0 300x450", display1.bounds().ToString()); | 373 EXPECT_EQ("0,0 300x450", display1.bounds().ToString()); |
381 EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString()); | 374 EXPECT_EQ("0,0 300x450", root_windows[0]->bounds().ToString()); |
382 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); | 375 EXPECT_EQ(1.5f, GetStoredUIScale(display1.id())); |
383 | 376 |
384 MoveMouseToInHostCoord(root_windows[0], 300, 200); | 377 generator.MoveMouseToInHost(300, 200); |
385 magnifier->SetEnabled(true); | 378 magnifier->SetEnabled(true); |
386 EXPECT_EQ("149,225", event_handler.GetLocationAndReset()); | 379 EXPECT_EQ("149,225", event_handler.GetLocationAndReset()); |
387 EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale()); | 380 EXPECT_FLOAT_EQ(2.0f, magnifier->GetScale()); |
388 | 381 |
389 MoveMouseToInHostCoord(root_windows[0], 300, 200); | 382 generator.MoveMouseToInHost(300, 200); |
390 EXPECT_EQ("148,224", event_handler.GetLocationAndReset()); | 383 EXPECT_EQ("148,224", event_handler.GetLocationAndReset()); |
391 MoveMouseToInHostCoord(root_windows[0], 200, 300); | 384 generator.MoveMouseToInHost(200, 300); |
392 EXPECT_EQ("111,187", event_handler.GetLocationAndReset()); | 385 EXPECT_EQ("111,187", event_handler.GetLocationAndReset()); |
393 MoveMouseToInHostCoord(root_windows[0], 100, 400); | 386 generator.MoveMouseToInHost(100, 400); |
394 EXPECT_EQ("60,149", event_handler.GetLocationAndReset()); | 387 EXPECT_EQ("60,149", event_handler.GetLocationAndReset()); |
395 MoveMouseToInHostCoord(root_windows[0], 0, 0); | 388 generator.MoveMouseToInHost(0, 0); |
396 EXPECT_EQ("159,99", event_handler.GetLocationAndReset()); | 389 EXPECT_EQ("159,99", event_handler.GetLocationAndReset()); |
397 | 390 |
398 magnifier->SetEnabled(false); | 391 magnifier->SetEnabled(false); |
399 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); | 392 EXPECT_FLOAT_EQ(1.0f, magnifier->GetScale()); |
400 | 393 |
401 Shell::GetInstance()->RemovePreTargetHandler(&event_handler); | 394 Shell::GetInstance()->RemovePreTargetHandler(&event_handler); |
402 } | 395 } |
403 | 396 |
404 } // namespace test | 397 } // namespace test |
405 } // namespace ash | 398 } // namespace ash |
OLD | NEW |