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