OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/test/ash_test_base.h" | 5 #include "ash/test/ash_test_base.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 } | 173 } |
174 | 174 |
175 aura::test::EventGenerator& AshTestBase::GetEventGenerator() { | 175 aura::test::EventGenerator& AshTestBase::GetEventGenerator() { |
176 if (!event_generator_) { | 176 if (!event_generator_) { |
177 event_generator_.reset( | 177 event_generator_.reset( |
178 new aura::test::EventGenerator(new AshEventGeneratorDelegate())); | 178 new aura::test::EventGenerator(new AshEventGeneratorDelegate())); |
179 } | 179 } |
180 return *event_generator_.get(); | 180 return *event_generator_.get(); |
181 } | 181 } |
182 | 182 |
| 183 // static |
| 184 bool AshTestBase::SupportsMultipleDisplays() { |
| 185 #if defined(OS_WIN) |
| 186 return base::win::GetVersion() < base::win::VERSION_WIN8; |
| 187 #else |
| 188 return true; |
| 189 #endif |
| 190 } |
| 191 |
183 void AshTestBase::UpdateDisplay(const std::string& display_specs) { | 192 void AshTestBase::UpdateDisplay(const std::string& display_specs) { |
184 DisplayManagerTestApi display_manager_test_api( | 193 DisplayManagerTestApi display_manager_test_api( |
185 Shell::GetInstance()->display_manager()); | 194 Shell::GetInstance()->display_manager()); |
186 display_manager_test_api.UpdateDisplay(display_specs); | 195 display_manager_test_api.UpdateDisplay(display_specs); |
187 } | 196 } |
188 | 197 |
189 aura::RootWindow* AshTestBase::CurrentContext() { | 198 aura::RootWindow* AshTestBase::CurrentContext() { |
190 return ash_test_helper_->CurrentContext(); | 199 return ash_test_helper_->CurrentContext(); |
191 } | 200 } |
192 | 201 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 SetHasActiveUser(user_logged_in); | 272 SetHasActiveUser(user_logged_in); |
264 } | 273 } |
265 | 274 |
266 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { | 275 void AshTestBase::SetCanLockScreen(bool can_lock_screen) { |
267 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> | 276 ash_test_helper_->test_shell_delegate()->test_session_state_delegate()-> |
268 SetCanLockScreen(can_lock_screen); | 277 SetCanLockScreen(can_lock_screen); |
269 } | 278 } |
270 | 279 |
271 } // namespace test | 280 } // namespace test |
272 } // namespace ash | 281 } // namespace ash |
OLD | NEW |