OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #include "ui/gfx/compositor/test/test_suite.h" | |
6 | |
7 #include "base/message_loop.h" | |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" | |
9 #include "ui/base/ui_base_paths.h" | |
10 #include "ui/gfx/compositor/compositor.h" | |
11 #include "ui/gfx/compositor/test/compositor_test_support.h" | |
12 #include "ui/gfx/gfx_paths.h" | |
13 #include "ui/gfx/gl/gl_implementation.h" | |
14 | |
15 CompositorTestSuite::CompositorTestSuite(int argc, char** argv) | |
16 : TestSuite(argc, argv) {} | |
17 | |
18 CompositorTestSuite::~CompositorTestSuite() {} | |
19 | |
20 void CompositorTestSuite::Initialize() { | |
21 #if defined(OS_LINUX) | |
22 gfx::InitializeGLBindings(gfx::kGLImplementationOSMesaGL); | |
23 #endif | |
24 base::TestSuite::Initialize(); | |
25 | |
26 gfx::RegisterPathProvider(); | |
27 | |
28 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_UI)); | |
29 ui::CompositorTestSupport::Initialize(); | |
30 ui::Compositor::Initialize(false); | |
31 } | |
32 | |
33 void CompositorTestSuite::Shutdown() { | |
34 ui::Compositor::Terminate(); | |
35 ui::CompositorTestSupport::Terminate(); | |
36 message_loop_.reset(); | |
37 | |
38 base::TestSuite::Shutdown(); | |
39 } | |
OLD | NEW |