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

Unified Diff: ui/aura/mus/window_tree_host_mus.cc

Issue 2865443002: Install FakeContextFactory for AuraMusWmTestBase (Closed)
Patch Set: Add comments Created 3 years, 7 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/aura/test/aura_mus_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/mus/window_tree_host_mus.cc
diff --git a/ui/aura/mus/window_tree_host_mus.cc b/ui/aura/mus/window_tree_host_mus.cc
index a6500d0c9effe1adb9e03eb6d56982b9e6f846df..8ff144e9a0d6e7101257db6e48b72f44b72e8185 100644
--- a/ui/aura/mus/window_tree_host_mus.cc
+++ b/ui/aura/mus/window_tree_host_mus.cc
@@ -30,10 +30,6 @@ DEFINE_UI_CLASS_PROPERTY_KEY(
static uint32_t accelerated_widget_count = 1;
-bool IsUsingTestContext() {
- return aura::Env::GetInstance()->context_factory()->DoesCreateTestContexts();
-}
-
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -60,20 +56,16 @@ WindowTreeHostMus::WindowTreeHostMus(WindowTreeHostMusInitParams init_params)
// process then ui::Compositor will not a cc::FrameSinkId.
CreateCompositor(init_params.frame_sink_id);
gfx::AcceleratedWidget accelerated_widget;
- if (IsUsingTestContext()) {
- accelerated_widget = gfx::kNullAcceleratedWidget;
- } else {
// We need accelerated widget numbers to be different for each
// window and fit in the smallest sizeof(AcceleratedWidget) uint32_t
// has this property.
#if defined(OS_WIN) || defined(OS_ANDROID)
- accelerated_widget =
- reinterpret_cast<gfx::AcceleratedWidget>(accelerated_widget_count++);
+ accelerated_widget =
+ reinterpret_cast<gfx::AcceleratedWidget>(accelerated_widget_count++);
#else
- accelerated_widget =
- static_cast<gfx::AcceleratedWidget>(accelerated_widget_count++);
+ accelerated_widget =
+ static_cast<gfx::AcceleratedWidget>(accelerated_widget_count++);
#endif
- }
OnAcceleratedWidgetAvailable(accelerated_widget,
GetDisplay().device_scale_factor());
« no previous file with comments | « no previous file | ui/aura/test/aura_mus_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698