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

Side by Side Diff: ui/compositor/test/test_suite.cc

Issue 2860703002: Use TaskScheduler instead of WorkerPool in x11_hotplug_event_handler.cc. (Closed)
Patch Set: Add ScopedTaskEnvironment in SoftwareOutputDeviceOzoneTest 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 unified diff | Download patch
« no previous file with comments | « ui/compositor/test/test_suite.h ('k') | ui/events/platform/x11/x11_hotplug_event_handler.cc » ('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/compositor/test/test_suite.h" 5 #include "ui/compositor/test/test_suite.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/test/scoped_task_environment.h"
9 #include "build/build_config.h" 10 #include "build/build_config.h"
10 #include "ui/compositor/compositor.h" 11 #include "ui/compositor/compositor.h"
11 #include "ui/compositor/compositor_switches.h" 12 #include "ui/compositor/compositor_switches.h"
12 #include "ui/compositor/layer.h" 13 #include "ui/compositor/layer.h"
13 #include "ui/gfx/gfx_paths.h" 14 #include "ui/gfx/gfx_paths.h"
14 #include "ui/gl/test/gl_surface_test_support.h" 15 #include "ui/gl/test/gl_surface_test_support.h"
15 16
16 #if defined(USE_OZONE) 17 #if defined(USE_OZONE)
17 #include "ui/ozone/public/ozone_platform.h" 18 #include "ui/ozone/public/ozone_platform.h"
18 #endif 19 #endif
(...skipping 17 matching lines...) Expand all
36 #if defined(USE_OZONE) 37 #if defined(USE_OZONE)
37 ui::OzonePlatform::InitializeForUI(); 38 ui::OzonePlatform::InitializeForUI();
38 #endif 39 #endif
39 40
40 gfx::RegisterPathProvider(); 41 gfx::RegisterPathProvider();
41 42
42 #if defined(OS_WIN) 43 #if defined(OS_WIN)
43 display::win::SetDefaultDeviceScaleFactor(1.0f); 44 display::win::SetDefaultDeviceScaleFactor(1.0f);
44 #endif 45 #endif
45 46
46 message_loop_.reset(new base::MessageLoopForUI); 47 scoped_task_environment_ =
48 base::MakeUnique<base::test::ScopedTaskEnvironment>(
49 base::test::ScopedTaskEnvironment::MainThreadType::UI);
47 } 50 }
48 51
49 void CompositorTestSuite::Shutdown() { 52 void CompositorTestSuite::Shutdown() {
50 message_loop_.reset(); 53 scoped_task_environment_.reset();
51 54
52 base::TestSuite::Shutdown(); 55 base::TestSuite::Shutdown();
53 } 56 }
54 57
55 } // namespace test 58 } // namespace test
56 } // namespace ui 59 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/test/test_suite.h ('k') | ui/events/platform/x11/x11_hotplug_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698