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/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/message_loop/message_loop.h" |
9 #include "ui/base/ui_base_paths.h" | 9 #include "ui/base/ui_base_paths.h" |
10 #include "ui/compositor/compositor.h" | 10 #include "ui/compositor/compositor.h" |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) | 22 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) |
23 : TestSuite(argc, argv) {} | 23 : TestSuite(argc, argv) {} |
24 | 24 |
25 CompositorTestSuite::~CompositorTestSuite() {} | 25 CompositorTestSuite::~CompositorTestSuite() {} |
26 | 26 |
27 void CompositorTestSuite::Initialize() { | 27 void CompositorTestSuite::Initialize() { |
28 #if defined(USE_X11) | 28 #if defined(USE_X11) |
29 XInitThreads(); | 29 XInitThreads(); |
30 #endif | 30 #endif |
31 #if defined(OS_LINUX) | 31 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); |
32 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); | |
33 #endif | |
34 base::TestSuite::Initialize(); | 32 base::TestSuite::Initialize(); |
35 | 33 |
36 gfx::RegisterPathProvider(); | 34 gfx::RegisterPathProvider(); |
37 | 35 |
38 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 36 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
39 Compositor::Initialize(); | |
40 } | 37 } |
41 | 38 |
42 void CompositorTestSuite::Shutdown() { | 39 void CompositorTestSuite::Shutdown() { |
43 Compositor::Terminate(); | |
44 message_loop_.reset(); | 40 message_loop_.reset(); |
45 | 41 |
46 base::TestSuite::Shutdown(); | 42 base::TestSuite::Shutdown(); |
47 } | 43 } |
48 | 44 |
49 } // namespace test | 45 } // namespace test |
50 } // namespace ui | 46 } // namespace ui |
OLD | NEW |