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 "cc/test/cc_test_suite.h" | 5 #include "cc/test/cc_test_suite.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/threading/thread_id_name_manager.h" | 11 #include "base/threading/thread_id_name_manager.h" |
12 #include "cc/base/switches.h" | 12 #include "cc/base/switches.h" |
13 #include "cc/test/paths.h" | 13 #include "cc/test/paths.h" |
| 14 #include "ui/gl/gl_surface.h" |
14 | 15 |
15 namespace cc { | 16 namespace cc { |
16 | 17 |
17 CCTestSuite::CCTestSuite(int argc, char** argv) | 18 CCTestSuite::CCTestSuite(int argc, char** argv) |
18 : base::TestSuite(argc, argv) {} | 19 : base::TestSuite(argc, argv) {} |
19 | 20 |
20 CCTestSuite::~CCTestSuite() {} | 21 CCTestSuite::~CCTestSuite() {} |
21 | 22 |
22 void CCTestSuite::Initialize() { | 23 void CCTestSuite::Initialize() { |
23 base::TestSuite::Initialize(); | 24 base::TestSuite::Initialize(); |
| 25 gfx::GLSurface::InitializeOneOffForTests(); |
24 CCPaths::RegisterPathProvider(); | 26 CCPaths::RegisterPathProvider(); |
25 | 27 |
26 message_loop_.reset(new base::MessageLoop); | 28 message_loop_.reset(new base::MessageLoop); |
27 | 29 |
28 base::ThreadIdNameManager::GetInstance()->SetName( | 30 base::ThreadIdNameManager::GetInstance()->SetName( |
29 base::PlatformThread::CurrentId(), | 31 base::PlatformThread::CurrentId(), |
30 "Main"); | 32 "Main"); |
31 } | 33 } |
32 | 34 |
33 void CCTestSuite::Shutdown() { | 35 void CCTestSuite::Shutdown() { |
34 message_loop_.reset(); | 36 message_loop_.reset(); |
35 | 37 |
36 base::TestSuite::Shutdown(); | 38 base::TestSuite::Shutdown(); |
37 } | 39 } |
38 | 40 |
39 } // namespace cc | 41 } // namespace cc |
OLD | NEW |