Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: ui/aura/test/aura_test_base.cc

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)
Patch Set: Restore mash Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/aura/mus/mus_context_factory.cc ('k') | ui/aura/test/aura_test_helper.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/aura/mus/mus_context_factory.cc ('k') | ui/aura/test/aura_test_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698