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