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

Unified Diff: base/test/trace_event_analyzer_unittest.cc

Issue 10837082: implement SetWatchEvent and WaitForEvent for trace-based-tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update / merge -- no change Created 8 years, 4 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
« no previous file with comments | « base/debug/trace_event_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/trace_event_analyzer_unittest.cc
diff --git a/base/test/trace_event_analyzer_unittest.cc b/base/test/trace_event_analyzer_unittest.cc
index 63760a4fada50ff31049ae4a8a9e8d6ded5bc794..5d850e22ee30203164db5df6e90a071ddf2f8ac6 100644
--- a/base/test/trace_event_analyzer_unittest.cc
+++ b/base/test/trace_event_analyzer_unittest.cc
@@ -26,11 +26,7 @@ class TraceEventAnalyzerTest : public testing::Test {
void TraceEventAnalyzerTest::ManualSetUp() {
base::debug::TraceLog::Resurrect();
- base::debug::TraceLog* tracelog = base::debug::TraceLog::GetInstance();
- ASSERT_TRUE(tracelog);
- tracelog->SetOutputCallback(
- base::Bind(&TraceEventAnalyzerTest::OnTraceDataCollected,
- base::Unretained(this)));
+ ASSERT_TRUE(base::debug::TraceLog::GetInstance());
buffer_.SetOutputCallback(output_.GetCallback());
output_.json_output.clear();
}
@@ -48,6 +44,9 @@ void TraceEventAnalyzerTest::BeginTracing() {
void TraceEventAnalyzerTest::EndTracing() {
base::debug::TraceLog::GetInstance()->SetEnabled(false);
+ base::debug::TraceLog::GetInstance()->Flush(
+ base::Bind(&TraceEventAnalyzerTest::OnTraceDataCollected,
+ base::Unretained(this)));
buffer_.Finish();
}
« no previous file with comments | « base/debug/trace_event_unittest.cc ('k') | chrome/chrome_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698