| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_helper.h" | 5 #include "ash/test/ash_test_helper.h" |
| 6 | 6 |
| 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" | 7 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
| 8 #include "ash/aura/wm_shell_aura.h" | 8 #include "ash/aura/wm_shell_aura.h" |
| 9 #include "ash/common/test/test_session_state_delegate.h" | 9 #include "ash/common/test/test_session_state_delegate.h" |
| 10 #include "ash/common/test/test_system_tray_delegate.h" | 10 #include "ash/common/test/test_system_tray_delegate.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 AshTestHelper::~AshTestHelper() {} | 82 AshTestHelper::~AshTestHelper() {} |
| 83 | 83 |
| 84 void AshTestHelper::SetUp(bool start_session) { | 84 void AshTestHelper::SetUp(bool start_session) { |
| 85 display::ResetDisplayIdForTest(); | 85 display::ResetDisplayIdForTest(); |
| 86 if (config_ != Config::CLASSIC) | 86 if (config_ != Config::CLASSIC) |
| 87 aura::test::EnvTestHelper().SetAlwaysUseLastMouseLocation(true); | 87 aura::test::EnvTestHelper().SetAlwaysUseLastMouseLocation(true); |
| 88 // WindowManager creates WMState for mash. | 88 // WindowManager creates WMState for mash. |
| 89 if (config_ == Config::CLASSIC) | 89 if (config_ == Config::CLASSIC) |
| 90 wm_state_ = base::MakeUnique<::wm::WMState>(); | 90 wm_state_ = base::MakeUnique<::wm::WMState>(); |
| 91 views_delegate_ = ash_test_environment_->CreateViewsDelegate(); | 91 test_views_delegate_ = ash_test_environment_->CreateViewsDelegate(); |
| 92 | 92 |
| 93 // Disable animations during tests. | 93 // Disable animations during tests. |
| 94 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 94 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
| 95 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 95 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
| 96 ui::InitializeInputMethodForTesting(); | 96 ui::InitializeInputMethodForTesting(); |
| 97 | 97 |
| 98 // Creates Shell and hook with Desktop. | 98 // Creates Shell and hook with Desktop. |
| 99 if (!test_shell_delegate_) | 99 if (!test_shell_delegate_) |
| 100 test_shell_delegate_ = new TestShellDelegate; | 100 test_shell_delegate_ = new TestShellDelegate; |
| 101 | 101 |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 std::set<RootWindowController*> roots = | 377 std::set<RootWindowController*> roots = |
| 378 window_manager_app_->window_manager()->GetRootWindowControllers(); | 378 window_manager_app_->window_manager()->GetRootWindowControllers(); |
| 379 std::vector<RootWindowController*> ordered_roots; | 379 std::vector<RootWindowController*> ordered_roots; |
| 380 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); | 380 ordered_roots.insert(ordered_roots.begin(), roots.begin(), roots.end()); |
| 381 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); | 381 std::sort(ordered_roots.begin(), ordered_roots.end(), &CompareByDisplayId); |
| 382 return ordered_roots; | 382 return ordered_roots; |
| 383 } | 383 } |
| 384 | 384 |
| 385 } // namespace test | 385 } // namespace test |
| 386 } // namespace ash | 386 } // namespace ash |
| OLD | NEW |