OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/display_manager.h" | |
6 #include "ash/magnifier/magnification_controller.h" | 5 #include "ash/magnifier/magnification_controller.h" |
7 #include "ash/magnifier/partial_magnification_controller.h" | 6 #include "ash/magnifier/partial_magnification_controller.h" |
8 #include "ash/shell.h" | 7 #include "ash/shell.h" |
9 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "ui/display/manager/display_manager.h" |
10 #include "ui/events/test/event_generator.h" | 10 #include "ui/events/test/event_generator.h" |
11 #include "ui/views/widget/widget.h" | 11 #include "ui/views/widget/widget.h" |
12 | 12 |
13 namespace ash { | 13 namespace ash { |
14 | 14 |
15 // Wrapper for PartialMagnificationController that exposes internal state to | 15 // Wrapper for PartialMagnificationController that exposes internal state to |
16 // test functions. | 16 // test functions. |
17 class PartialMagnificationControllerTestApi { | 17 class PartialMagnificationControllerTestApi { |
18 public: | 18 public: |
19 explicit PartialMagnificationControllerTestApi( | 19 explicit PartialMagnificationControllerTestApi( |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 | 157 |
158 // Make sure the window is initially placed correctly. | 158 // Make sure the window is initially placed correctly. |
159 GetEventGenerator().set_current_location(gfx::Point(50, 20)); | 159 GetEventGenerator().set_current_location(gfx::Point(50, 20)); |
160 EXPECT_FALSE(GetTestApi().is_active()); | 160 EXPECT_FALSE(GetTestApi().is_active()); |
161 GetEventGenerator().PressLeftButton(); | 161 GetEventGenerator().PressLeftButton(); |
162 EXPECT_EQ(GetEventGenerator().current_location() + offset, | 162 EXPECT_EQ(GetEventGenerator().current_location() + offset, |
163 GetTestApi().GetWidgetOrigin()); | 163 GetTestApi().GetWidgetOrigin()); |
164 } | 164 } |
165 | 165 |
166 } // namespace ash | 166 } // namespace ash |
OLD | NEW |