| 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 "ui/aura/test/aura_test_helper.h" | 5 #include "ui/aura/test/aura_test_helper.h" |
| 6 | 6 |
| 7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "ui/aura/client/default_capture_client.h" | 10 #include "ui/aura/client/default_capture_client.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // Disable animations during tests. | 45 // Disable animations during tests. |
| 46 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( | 46 zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode( |
| 47 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); | 47 ui::ScopedAnimationDurationScaleMode::ZERO_DURATION)); |
| 48 #if defined(USE_X11) | 48 #if defined(USE_X11) |
| 49 test::SetUseOverrideRedirectWindowByDefault(true); | 49 test::SetUseOverrideRedirectWindowByDefault(true); |
| 50 #endif | 50 #endif |
| 51 InitializeAuraEventGeneratorDelegate(); | 51 InitializeAuraEventGeneratorDelegate(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 AuraTestHelper::~AuraTestHelper() { | 54 AuraTestHelper::~AuraTestHelper() { |
| 55 CHECK(setup_called_) | 55 // AuraTestHelper::SetUp() never called. |
| 56 << "AuraTestHelper::SetUp() never called."; | 56 CHECK(setup_called_); |
| 57 CHECK(teardown_called_) | 57 // AuraTestHelper::TearDown() never called. |
| 58 << "AuraTestHelper::TearDown() never called."; | 58 CHECK(teardown_called_); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void AuraTestHelper::EnableMusWithTestWindowTree( | 61 void AuraTestHelper::EnableMusWithTestWindowTree( |
| 62 WindowTreeClientDelegate* window_tree_delegate, | 62 WindowTreeClientDelegate* window_tree_delegate, |
| 63 WindowManagerDelegate* window_manager_delegate) { | 63 WindowManagerDelegate* window_manager_delegate) { |
| 64 DCHECK(!setup_called_); | 64 DCHECK(!setup_called_); |
| 65 DCHECK_EQ(Mode::LOCAL, mode_); | 65 DCHECK_EQ(Mode::LOCAL, mode_); |
| 66 mode_ = Mode::MUS_CREATE_WINDOW_TREE_CLIENT; | 66 mode_ = Mode::MUS_CREATE_WINDOW_TREE_CLIENT; |
| 67 window_tree_delegate_ = window_tree_delegate; | 67 window_tree_delegate_ = window_tree_delegate; |
| 68 window_manager_delegate_ = window_manager_delegate; | 68 window_manager_delegate_ = window_manager_delegate; |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 void AuraTestHelper::InitWindowTreeClient() { | 175 void AuraTestHelper::InitWindowTreeClient() { |
| 176 window_tree_client_setup_ = base::MakeUnique<TestWindowTreeClientSetup>(); | 176 window_tree_client_setup_ = base::MakeUnique<TestWindowTreeClientSetup>(); |
| 177 window_tree_client_setup_->InitForWindowManager(window_tree_delegate_, | 177 window_tree_client_setup_->InitForWindowManager(window_tree_delegate_, |
| 178 window_manager_delegate_); | 178 window_manager_delegate_); |
| 179 window_tree_client_ = window_tree_client_setup_->window_tree_client(); | 179 window_tree_client_ = window_tree_client_setup_->window_tree_client(); |
| 180 } | 180 } |
| 181 | 181 |
| 182 } // namespace test | 182 } // namespace test |
| 183 } // namespace aura | 183 } // namespace aura |
| OLD | NEW |