Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(206)

Side by Side Diff: cc/test/cc_test_suite.cc

Issue 14474006: Add a command line flag for dumping trace events to VLOG (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "Now beautiful" Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/command_line.h"
8 #include "base/debug/trace_event_impl.h"
7 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/threading/thread_id_name_manager.h"
11 #include "cc/base/switches.h"
8 #include "cc/test/paths.h" 12 #include "cc/test/paths.h"
9 13
10 namespace cc { 14 namespace cc {
11 15
12 CCTestSuite::CCTestSuite(int argc, char** argv) 16 CCTestSuite::CCTestSuite(int argc, char** argv)
13 : base::TestSuite(argc, argv) {} 17 : base::TestSuite(argc, argv) {}
14 18
15 CCTestSuite::~CCTestSuite() {} 19 CCTestSuite::~CCTestSuite() {}
16 20
17 void CCTestSuite::Initialize() { 21 void CCTestSuite::Initialize() {
18 base::TestSuite::Initialize(); 22 base::TestSuite::Initialize();
19 RegisterPathProvider(); 23 RegisterPathProvider();
24
25 if (CommandLine::ForCurrentProcess()->HasSwitch(
26 switches::kCCUnittestsTraceEventsToStderr)) {
27 base::debug::TraceLog::GetInstance()->SetEnabled(
28 base::debug::CategoryFilter("cc"),
29 base::debug::TraceLog::ECHO_TO_STDERR);
danakj 2013/04/24 20:07:41 Do you want RECORD_CONTINUOUSLY in the options as
Ian Vollick 2013/04/24 22:57:11 Good call! Done.
30 }
31
20 message_loop_.reset(new MessageLoop); 32 message_loop_.reset(new MessageLoop);
33
34 base::ThreadIdNameManager::GetInstance()->SetName(
35 base::PlatformThread::CurrentId(),
36 "Main");
21 } 37 }
22 38
23 void CCTestSuite::Shutdown() { 39 void CCTestSuite::Shutdown() {
24 message_loop_.reset(); 40 message_loop_.reset();
25 41
26 base::TestSuite::Shutdown(); 42 base::TestSuite::Shutdown();
27 } 43 }
28 44
29 } // namespace cc 45 } // namespace cc
OLDNEW
« cc/base/switches.cc ('K') | « cc/base/switches.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698