| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "components/display_compositor/display_compositor_test_suite.h" | 5 #include "components/display_compositor/display_compositor_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/test/gl_surface_test_support.h" | 10 #include "ui/gl/test/gl_surface_test_support.h" |
| 11 | 11 |
| 12 namespace display_compositor { | 12 namespace display_compositor { |
| 13 | 13 |
| 14 DisplayCompositorTestSuite::DisplayCompositorTestSuite(int argc, char** argv) | 14 DisplayCompositorTestSuite::DisplayCompositorTestSuite(int argc, char** argv) |
| 15 : base::TestSuite(argc, argv) {} | 15 : base::TestSuite(argc, argv) {} |
| 16 | 16 |
| 17 DisplayCompositorTestSuite::~DisplayCompositorTestSuite() {} | 17 DisplayCompositorTestSuite::~DisplayCompositorTestSuite() {} |
| 18 | 18 |
| 19 void DisplayCompositorTestSuite::Initialize() { | 19 void DisplayCompositorTestSuite::Initialize() { |
| 20 base::TestSuite::Initialize(); | 20 base::TestSuite::Initialize(); |
| 21 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 21 gl::GLSurfaceTestSupport::InitializeOneOff(); |
| 22 cc::CCPaths::RegisterPathProvider(); | 22 cc::CCPaths::RegisterPathProvider(); |
| 23 | 23 |
| 24 message_loop_.reset(new base::MessageLoop); | 24 message_loop_.reset(new base::MessageLoop); |
| 25 | 25 |
| 26 base::ThreadIdNameManager::GetInstance()->SetName( | 26 base::ThreadIdNameManager::GetInstance()->SetName( |
| 27 base::PlatformThread::CurrentId(), "Main"); | 27 base::PlatformThread::CurrentId(), "Main"); |
| 28 | 28 |
| 29 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); | 29 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void DisplayCompositorTestSuite::Shutdown() { | 32 void DisplayCompositorTestSuite::Shutdown() { |
| 33 message_loop_ = nullptr; | 33 message_loop_ = nullptr; |
| 34 | 34 |
| 35 base::TestSuite::Shutdown(); | 35 base::TestSuite::Shutdown(); |
| 36 } | 36 } |
| 37 | 37 |
| 38 } // namespace display_compositor | 38 } // namespace display_compositor |
| OLD | NEW |