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" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 gesture_config->set_semi_long_press_time_in_ms(400); | 67 gesture_config->set_semi_long_press_time_in_ms(400); |
68 gesture_config->set_show_press_delay_in_ms(5); | 68 gesture_config->set_show_press_delay_in_ms(5); |
69 gesture_config->set_swipe_enabled(true); | 69 gesture_config->set_swipe_enabled(true); |
70 gesture_config->set_tab_scrub_activation_delay_in_ms(200); | 70 gesture_config->set_tab_scrub_activation_delay_in_ms(200); |
71 gesture_config->set_two_finger_tap_enabled(true); | 71 gesture_config->set_two_finger_tap_enabled(true); |
72 gesture_config->set_velocity_tracker_strategy( | 72 gesture_config->set_velocity_tracker_strategy( |
73 ui::VelocityTracker::Strategy::LSQ2_RESTRICTED); | 73 ui::VelocityTracker::Strategy::LSQ2_RESTRICTED); |
74 | 74 |
75 // The ContextFactory must exist before any Compositors are created. | 75 // The ContextFactory must exist before any Compositors are created. |
76 bool enable_pixel_output = false; | 76 bool enable_pixel_output = false; |
77 ui::ContextFactory* context_factory = | 77 ui::ContextFactory* context_factory = nullptr; |
78 ui::InitializeContextFactoryForTests(enable_pixel_output); | 78 ui::ContextFactoryPrivate* context_factory_private = nullptr; |
| 79 ui::InitializeContextFactoryForTests(enable_pixel_output, &context_factory, |
| 80 &context_factory_private); |
79 | 81 |
80 helper_.reset(new AuraTestHelper(&message_loop_)); | 82 helper_.reset(new AuraTestHelper(&message_loop_)); |
81 if (use_mus_) { | 83 if (use_mus_) { |
82 helper_->EnableMusWithTestWindowTree(window_tree_client_delegate_, | 84 helper_->EnableMusWithTestWindowTree(window_tree_client_delegate_, |
83 window_manager_delegate_); | 85 window_manager_delegate_); |
84 } | 86 } |
85 helper_->SetUp(context_factory); | 87 helper_->SetUp(context_factory, context_factory_private); |
86 } | 88 } |
87 | 89 |
88 void AuraTestBase::TearDown() { | 90 void AuraTestBase::TearDown() { |
89 teardown_called_ = true; | 91 teardown_called_ = true; |
90 | 92 |
91 // Flush the message loop because we have pending release tasks | 93 // Flush the message loop because we have pending release tasks |
92 // and these tasks if un-executed would upset Valgrind. | 94 // and these tasks if un-executed would upset Valgrind. |
93 RunAllPendingInMessageLoop(); | 95 RunAllPendingInMessageLoop(); |
94 | 96 |
95 window_tree_hosts_.clear(); | 97 window_tree_hosts_.clear(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 | 238 |
237 void AuraTestBaseWithType::SetUp() { | 239 void AuraTestBaseWithType::SetUp() { |
238 DCHECK(!setup_called_); | 240 DCHECK(!setup_called_); |
239 setup_called_ = true; | 241 setup_called_ = true; |
240 ConfigureBackend(GetParam()); | 242 ConfigureBackend(GetParam()); |
241 AuraTestBase::SetUp(); | 243 AuraTestBase::SetUp(); |
242 } | 244 } |
243 | 245 |
244 } // namespace test | 246 } // namespace test |
245 } // namespace aura | 247 } // namespace aura |
OLD | NEW |