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

Unified 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 side-by-side diff with in-line comments
Download patch
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..6572418dcccc11a0abfae3ded74357bce6a2cf68 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,19 @@ CCTestSuite::~CCTestSuite() {}
void CCTestSuite::Initialize() {
base::TestSuite::Initialize();
RegisterPathProvider();
+
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kCCUnittestsTraceEventsToStderr)) {
+ base::debug::TraceLog::GetInstance()->SetEnabled(
+ base::debug::CategoryFilter("cc"),
+ 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.
+ }
+
message_loop_.reset(new MessageLoop);
+
+ base::ThreadIdNameManager::GetInstance()->SetName(
+ base::PlatformThread::CurrentId(),
+ "Main");
}
void CCTestSuite::Shutdown() {
« 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