OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/system/chromeos/rotation/tray_rotation_lock.h" | 5 #include "ash/system/chromeos/rotation/tray_rotation_lock.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/display/display_manager.h" | 8 #include "ash/display/display_manager.h" |
9 #include "ash/root_window_controller.h" | 9 #include "ash/root_window_controller.h" |
10 #include "ash/shelf/shelf_widget.h" | 10 #include "ash/shelf/shelf_widget.h" |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // Tests that activating the default view causes the display to have its | 202 // Tests that activating the default view causes the display to have its |
203 // rotation locked, and that the tray view becomes visible. | 203 // rotation locked, and that the tray view becomes visible. |
204 TEST_F(TrayRotationLockTest, PerformActionOnDefaultView) { | 204 TEST_F(TrayRotationLockTest, PerformActionOnDefaultView) { |
205 MaximizeModeController* maximize_mode_controller = Shell::GetInstance()-> | 205 MaximizeModeController* maximize_mode_controller = Shell::GetInstance()-> |
206 maximize_mode_controller(); | 206 maximize_mode_controller(); |
207 ASSERT_FALSE(maximize_mode_controller->rotation_locked()); | 207 ASSERT_FALSE(maximize_mode_controller->rotation_locked()); |
208 Shell::GetInstance()->maximize_mode_controller()-> | 208 Shell::GetInstance()->maximize_mode_controller()-> |
209 EnableMaximizeModeWindowManager(true); | 209 EnableMaximizeModeWindowManager(true); |
210 ASSERT_FALSE(tray_view()->visible()); | 210 ASSERT_FALSE(tray_view()->visible()); |
211 | 211 |
212 ui::GestureEvent tap( | 212 ui::GestureEvent tap(0, 0, 0, base::TimeDelta(), |
213 0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP)); | 213 ui::GestureEventDetails(ui::ET_GESTURE_TAP, 0.0f, 0.0f)); |
214 default_view()->OnGestureEvent(&tap); | 214 default_view()->OnGestureEvent(&tap); |
215 EXPECT_TRUE(maximize_mode_controller->rotation_locked()); | 215 EXPECT_TRUE(maximize_mode_controller->rotation_locked()); |
216 EXPECT_TRUE(tray_view()->visible()); | 216 EXPECT_TRUE(tray_view()->visible()); |
217 | 217 |
218 Shell::GetInstance()->maximize_mode_controller()-> | 218 Shell::GetInstance()->maximize_mode_controller()-> |
219 EnableMaximizeModeWindowManager(false); | 219 EnableMaximizeModeWindowManager(false); |
220 } | 220 } |
221 | 221 |
222 } // namespace ash | 222 } // namespace ash |
OLD | NEW |