Chromium Code Reviews| Index: cc/test/cc_test_suite.cc |
| diff --git a/cc/test/cc_test_suite.cc b/cc/test/cc_test_suite.cc |
| index c9d48b7ee763eec975799c24298ffc99e5d56418..58b8d06b5119d611d5ef52577395e686e644fefb 100644 |
| --- a/cc/test/cc_test_suite.cc |
| +++ b/cc/test/cc_test_suite.cc |
| @@ -4,7 +4,11 @@ |
| #include "cc/test/cc_test_suite.h" |
| +#include "base/command_line.h" |
| +#include "base/debug/trace_event_impl.h" |
| #include "base/message_loop.h" |
| +#include "base/threading/thread_id_name_manager.h" |
| +#include "cc/base/switches.h" |
| #include "cc/test/paths.h" |
| namespace cc { |
| @@ -17,7 +21,24 @@ CCTestSuite::~CCTestSuite() {} |
| void CCTestSuite::Initialize() { |
| base::TestSuite::Initialize(); |
| RegisterPathProvider(); |
| + |
| + if (CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kCCUnittestsTraceEventsToStderr)) { |
| + base::debug::TraceLog::Options options = |
| + static_cast<base::debug::TraceLog::Options>( |
| + base::debug::TraceLog::ECHO_TO_STDERR | |
| + base::debug::TraceLog::RECORD_CONTINUOUSLY); |
|
nduca
2013/04/25 02:32:35
not sure i get this bit. Why not turn on a non-rec
|
| + |
| + base::debug::TraceLog::GetInstance()->SetEnabled( |
| + base::debug::CategoryFilter("cc"), |
| + options); |
| + } |
| + |
| message_loop_.reset(new MessageLoop); |
| + |
| + base::ThreadIdNameManager::GetInstance()->SetName( |
| + base::PlatformThread::CurrentId(), |
| + "Main"); |
| } |
| void CCTestSuite::Shutdown() { |