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 CHECK(gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL)); | 31 #if defined(OS_LINUX) |
| 32 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); |
| 33 #endif |
32 base::TestSuite::Initialize(); | 34 base::TestSuite::Initialize(); |
33 | 35 |
34 gfx::RegisterPathProvider(); | 36 gfx::RegisterPathProvider(); |
35 | 37 |
36 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); | 38 message_loop_.reset(new base::MessageLoop(base::MessageLoop::TYPE_UI)); |
| 39 Compositor::Initialize(); |
37 } | 40 } |
38 | 41 |
39 void CompositorTestSuite::Shutdown() { | 42 void CompositorTestSuite::Shutdown() { |
| 43 Compositor::Terminate(); |
40 message_loop_.reset(); | 44 message_loop_.reset(); |
41 | 45 |
42 base::TestSuite::Shutdown(); | 46 base::TestSuite::Shutdown(); |
43 } | 47 } |
44 | 48 |
45 } // namespace test | 49 } // namespace test |
46 } // namespace ui | 50 } // namespace ui |
OLD | NEW |