| 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_utils.h" | 8 #include "ui/aura/mus/property_utils.h" |
| 9 #include "ui/aura/mus/window_tree_client.h" | 9 #include "ui/aura/mus/window_tree_client.h" |
| 10 #include "ui/aura/mus/window_tree_host_mus.h" | 10 #include "ui/aura/mus/window_tree_host_mus.h" |
| 11 #include "ui/aura/test/test_window_delegate.h" | 11 #include "ui/aura/test/test_window_delegate.h" |
| 12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
| 13 #include "ui/base/ime/input_method_initializer.h" | 13 #include "ui/base/ime/input_method_initializer.h" |
| 14 #include "ui/base/material_design/material_design_controller.h" | 14 #include "ui/base/material_design/material_design_controller.h" |
| 15 #include "ui/base/test/material_design_controller_test_api.h" | 15 #include "ui/base/test/material_design_controller_test_api.h" |
| 16 #include "ui/compositor/test/context_factories_for_test.h" | 16 #include "ui/compositor/test/context_factories_for_test.h" |
| 17 #include "ui/events/event_dispatcher.h" | 17 #include "ui/events/event_dispatcher.h" |
| 18 #include "ui/events/event_processor.h" | 18 #include "ui/events/event_processor.h" |
| 19 #include "ui/events/gesture_detection/gesture_configuration.h" | 19 #include "ui/events/gesture_detection/gesture_configuration.h" |
| 20 | 20 |
| 21 namespace aura { | 21 namespace aura { |
| 22 namespace test { | 22 namespace test { |
| 23 | 23 |
| 24 AuraTestBase::AuraTestBase() | 24 AuraTestBase::AuraTestBase() |
| 25 : window_manager_delegate_(this), window_tree_client_delegate_(this) {} | 25 : window_manager_delegate_(this), window_tree_client_delegate_(this) {} |
| 26 | 26 |
| 27 AuraTestBase::~AuraTestBase() { | 27 AuraTestBase::~AuraTestBase() { |
| 28 CHECK(setup_called_) | 28 // You have overridden SetUp but never called super class's SetUp |
| 29 << "You have overridden SetUp but never called super class's SetUp"; | 29 CHECK(setup_called_); |
| 30 CHECK(teardown_called_) | 30 // You have overridden TearDown but never called super class's TearDown |
| 31 << "You have overridden TearDown but never called super class's TearDown"; | 31 CHECK(teardown_called_); |
| 32 } | 32 } |
| 33 | 33 |
| 34 void AuraTestBase::SetUp() { | 34 void AuraTestBase::SetUp() { |
| 35 setup_called_ = true; | 35 setup_called_ = true; |
| 36 testing::Test::SetUp(); | 36 testing::Test::SetUp(); |
| 37 // ContentTestSuiteBase might have already initialized | 37 // ContentTestSuiteBase might have already initialized |
| 38 // MaterialDesignController in unit_tests suite. | 38 // MaterialDesignController in unit_tests suite. |
| 39 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); | 39 ui::test::MaterialDesignControllerTestAPI::Uninitialize(); |
| 40 ui::MaterialDesignController::Initialize(); | 40 ui::MaterialDesignController::Initialize(); |
| 41 ui::InitializeInputMethodForTesting(); | 41 ui::InitializeInputMethodForTesting(); |
| (...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 | 236 |
| 237 void AuraTestBaseWithType::SetUp() { | 237 void AuraTestBaseWithType::SetUp() { |
| 238 DCHECK(!setup_called_); | 238 DCHECK(!setup_called_); |
| 239 setup_called_ = true; | 239 setup_called_ = true; |
| 240 ConfigureBackend(GetParam()); | 240 ConfigureBackend(GetParam()); |
| 241 AuraTestBase::SetUp(); | 241 AuraTestBase::SetUp(); |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace test | 244 } // namespace test |
| 245 } // namespace aura | 245 } // namespace aura |
| OLD | NEW |