Fix build break
[chromium-blink-merge.git] / ui / compositor / test / test_suite.cc
blob4340bfdcfd0fefa32a4d93641e2d2f9eab7f3f94
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
3 // found in the LICENSE file.
5 #include "ui/compositor/test/test_suite.h"
7 #include "base/command_line.h"
8 #include "base/message_loop.h"
9 #include "ui/base/ui_base_paths.h"
10 #include "ui/compositor/compositor.h"
11 #include "ui/compositor/compositor_switches.h"
12 #include "ui/compositor/test/compositor_test_support.h"
13 #include "ui/gfx/gfx_paths.h"
14 #include "ui/gl/gl_implementation.h"
16 #if defined(USE_X11)
17 #include <X11/Xlib.h>
18 #endif
20 namespace ui {
21 namespace test {
23 CompositorTestSuite::CompositorTestSuite(int argc, char** argv)
24 : TestSuite(argc, argv) {}
26 CompositorTestSuite::~CompositorTestSuite() {}
28 void CompositorTestSuite::Initialize() {
29 #if defined(USE_X11)
30 XInitThreads();
31 #endif
32 #if defined(OS_LINUX)
33 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL);
34 #endif
35 base::TestSuite::Initialize();
37 gfx::RegisterPathProvider();
39 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI));
40 CompositorTestSupport::Initialize();
41 Compositor::Initialize();
44 void CompositorTestSuite::Shutdown() {
45 Compositor::Terminate();
46 CompositorTestSupport::Terminate();
47 message_loop_.reset();
49 base::TestSuite::Shutdown();
52 } // namespace test
53 } // namespace ui