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

Unified Diff: components/tracing/child/child_trace_message_filter_browsertest.cc

Issue 2479593002: Tracing: Bail out early in tracing tests when tracing is already enabled. (Closed)
Patch Set: wording Created 4 years, 1 month 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 | « no previous file | content/browser/tracing/memory_tracing_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/tracing/child/child_trace_message_filter_browsertest.cc
diff --git a/components/tracing/child/child_trace_message_filter_browsertest.cc b/components/tracing/child/child_trace_message_filter_browsertest.cc
index d6befb393cac693729a8fa862787cd51ffa4e624..156de40fef4aa25e89bd0f3c83bee045c998604d 100644
--- a/components/tracing/child/child_trace_message_filter_browsertest.cc
+++ b/components/tracing/child/child_trace_message_filter_browsertest.cc
@@ -116,6 +116,13 @@ class ChildTracingTest : public content::RenderViewTest, public IPC::Listener {
}
void EnableTracingWithMemoryDumps() {
+ // Re-enabling tracing could crash these tests https://crbug.com/656729 .
+ if (base::trace_event::TraceLog::GetInstance()->IsEnabled()) {
+ FAIL() << "Tracing seems to be already enabled. "
+ "Very likely this is because the startup tracing file "
+ "has been leaked from a previous test.";
+ }
+
std::string category_filter = "-*,"; // Disable all other trace categories.
category_filter += MemoryDumpManager::kTraceCategory;
base::trace_event::TraceConfig trace_config(category_filter, "");
« no previous file with comments | « no previous file | content/browser/tracing/memory_tracing_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698