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

Side by Side Diff: ash/magnifier/partial_magnification_controller_unittest.cc

Issue 2653593004: chromeos: Remove AshTestBase::SupportsMultipleDisplays (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « ash/magnifier/magnification_controller_unittest.cc ('k') | ash/mus/test/ash_test_impl_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/magnifier/magnification_controller.h" 5 #include "ash/magnifier/magnification_controller.h"
6 #include "ash/magnifier/partial_magnification_controller.h" 6 #include "ash/magnifier/partial_magnification_controller.h"
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/test/ash_test_base.h" 8 #include "ash/test/ash_test_base.h"
9 #include "ui/display/manager/display_manager.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"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 EXPECT_TRUE(GetTestApi().is_active()); 82 EXPECT_TRUE(GetTestApi().is_active());
83 EXPECT_TRUE(GetTestApi().host_widget()); 83 EXPECT_TRUE(GetTestApi().host_widget());
84 GetEventGenerator().ReleaseTouch(); 84 GetEventGenerator().ReleaseTouch();
85 EXPECT_FALSE(GetTestApi().is_active()); 85 EXPECT_FALSE(GetTestApi().is_active());
86 EXPECT_FALSE(GetTestApi().host_widget()); 86 EXPECT_FALSE(GetTestApi().host_widget());
87 } 87 }
88 88
89 // Verifies that nothing bad happens if a second display is disconnected while 89 // Verifies that nothing bad happens if a second display is disconnected while
90 // the magnifier is active. 90 // the magnifier is active.
91 TEST_F(PartialMagnificationControllerTest, MultipleDisplays) { 91 TEST_F(PartialMagnificationControllerTest, MultipleDisplays) {
92 if (!SupportsMultipleDisplays())
93 return;
94 GetEventGenerator().EnterPenPointerMode(); 92 GetEventGenerator().EnterPenPointerMode();
95 93
96 // Active magnifier with two displays, move it to the second display. 94 // Active magnifier with two displays, move it to the second display.
97 UpdateDisplay("800x600,800x600"); 95 UpdateDisplay("800x600,800x600");
98 GetController()->SetEnabled(true); 96 GetController()->SetEnabled(true);
99 GetEventGenerator().PressTouch(); 97 GetEventGenerator().PressTouch();
100 GetEventGenerator().MoveTouch(gfx::Point(1200, 300)); 98 GetEventGenerator().MoveTouch(gfx::Point(1200, 300));
101 EXPECT_TRUE(GetTestApi().is_active()); 99 EXPECT_TRUE(GetTestApi().is_active());
102 EXPECT_TRUE(GetTestApi().host_widget()); 100 EXPECT_TRUE(GetTestApi().host_widget());
103 101
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 154
157 // Make sure the window is initially placed correctly. 155 // Make sure the window is initially placed correctly.
158 GetEventGenerator().set_current_location(gfx::Point(50, 20)); 156 GetEventGenerator().set_current_location(gfx::Point(50, 20));
159 EXPECT_FALSE(GetTestApi().is_active()); 157 EXPECT_FALSE(GetTestApi().is_active());
160 GetEventGenerator().PressTouch(); 158 GetEventGenerator().PressTouch();
161 EXPECT_EQ(GetEventGenerator().current_location() + offset, 159 EXPECT_EQ(GetEventGenerator().current_location() + offset,
162 GetTestApi().GetWidgetOrigin()); 160 GetTestApi().GetWidgetOrigin());
163 } 161 }
164 162
165 } // namespace ash 163 } // namespace ash
OLDNEW
« no previous file with comments | « ash/magnifier/magnification_controller_unittest.cc ('k') | ash/mus/test/ash_test_impl_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698