| 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_base.h" | 5 #include "ui/aura/test/aura_test_base.h" |
| 6 | 6 |
| 7 #include "ui/aura/client/window_parenting_client.h" | 7 #include "ui/aura/client/window_parenting_client.h" |
| 8 #include "ui/aura/mus/property_converter.h" | 8 #include "ui/aura/mus/property_converter.h" |
| 9 #include "ui/aura/mus/window_tree_client.h" | 9 #include "ui/aura/mus/window_tree_client.h" |
| 10 #include "ui/aura/test/test_window_delegate.h" | 10 #include "ui/aura/test/test_window_delegate.h" |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 window->SetBounds(gfx::Rect(0, 0, 100, 100)); | 138 window->SetBounds(gfx::Rect(0, 0, 100, 100)); |
| 139 window->Show(); | 139 window->Show(); |
| 140 return window; | 140 return window; |
| 141 } | 141 } |
| 142 | 142 |
| 143 void AuraTestBase::EnableMus() { | 143 void AuraTestBase::EnableMus() { |
| 144 DCHECK(!setup_called_); | 144 DCHECK(!setup_called_); |
| 145 use_mus_ = true; | 145 use_mus_ = true; |
| 146 } | 146 } |
| 147 | 147 |
| 148 void AuraTestBase::ConfigureBackend(BackendType type) { |
| 149 if (type == BackendType::MUS) |
| 150 EnableMus(); |
| 151 } |
| 152 |
| 148 void AuraTestBase::RunAllPendingInMessageLoop() { | 153 void AuraTestBase::RunAllPendingInMessageLoop() { |
| 149 helper_->RunAllPendingInMessageLoop(); | 154 helper_->RunAllPendingInMessageLoop(); |
| 150 } | 155 } |
| 151 | 156 |
| 152 void AuraTestBase::ParentWindow(Window* window) { | 157 void AuraTestBase::ParentWindow(Window* window) { |
| 153 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); | 158 client::ParentWindowWithContext(window, root_window(), gfx::Rect()); |
| 154 } | 159 } |
| 155 | 160 |
| 156 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) { | 161 bool AuraTestBase::DispatchEventUsingWindowDispatcher(ui::Event* event) { |
| 157 ui::EventDispatchDetails details = | 162 ui::EventDispatchDetails details = |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 } | 232 } |
| 228 | 233 |
| 229 client::CaptureClient* AuraTestBase::GetCaptureClient() { | 234 client::CaptureClient* AuraTestBase::GetCaptureClient() { |
| 230 return helper_->capture_client(); | 235 return helper_->capture_client(); |
| 231 } | 236 } |
| 232 | 237 |
| 233 PropertyConverter* AuraTestBase::GetPropertyConverter() { | 238 PropertyConverter* AuraTestBase::GetPropertyConverter() { |
| 234 return property_converter_.get(); | 239 return property_converter_.get(); |
| 235 } | 240 } |
| 236 | 241 |
| 242 AuraTestBaseWithType::AuraTestBaseWithType() {} |
| 243 |
| 244 AuraTestBaseWithType::~AuraTestBaseWithType() { |
| 245 DCHECK(setup_called_); |
| 246 } |
| 247 |
| 248 void AuraTestBaseWithType::SetUp() { |
| 249 DCHECK(!setup_called_); |
| 250 setup_called_ = true; |
| 251 ConfigureBackend(GetParam()); |
| 252 AuraTestBase::SetUp(); |
| 253 } |
| 254 |
| 237 } // namespace test | 255 } // namespace test |
| 238 } // namespace aura | 256 } // namespace aura |
| OLD | NEW |