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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 void TrayRotationLockTest::TearDownViews() { | 76 void TrayRotationLockTest::TearDownViews() { |
77 tray_view_.reset(); | 77 tray_view_.reset(); |
78 default_view_.reset(); | 78 default_view_.reset(); |
79 tray_.reset(); | 79 tray_.reset(); |
80 } | 80 } |
81 | 81 |
82 void TrayRotationLockTest::SetUp() { | 82 void TrayRotationLockTest::SetUp() { |
83 // The Display used for testing is not an internal display. This flag | 83 // The Display used for testing is not an internal display. This flag |
84 // allows for DisplayManager to treat it as one. TrayRotationLock is only | 84 // allows for DisplayManager to treat it as one. TrayRotationLock is only |
85 // visible on internal primary displays. | 85 // visible on internal primary displays. |
86 CommandLine::ForCurrentProcess()->AppendSwitch( | 86 base::CommandLine::ForCurrentProcess()->AppendSwitch( |
87 switches::kAshUseFirstDisplayAsInternal); | 87 switches::kAshUseFirstDisplayAsInternal); |
88 test::AshTestBase::SetUp(); | 88 test::AshTestBase::SetUp(); |
89 SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget()); | 89 SetUpForStatusAreaWidget(StatusAreaWidgetTestHelper::GetStatusAreaWidget()); |
90 } | 90 } |
91 | 91 |
92 void TrayRotationLockTest::TearDown() { | 92 void TrayRotationLockTest::TearDown() { |
93 TearDownViews(); | 93 TearDownViews(); |
94 test::AshTestBase::TearDown(); | 94 test::AshTestBase::TearDown(); |
95 } | 95 } |
96 | 96 |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP)); | 213 0, 0, 0, base::TimeDelta(), ui::GestureEventDetails(ui::ET_GESTURE_TAP)); |
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 |