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

Unified Diff: content/browser/tracing/memory_tracing_browsertest.cc

Issue 2479563002: tracing: Bail out early in tracing tests when tracing is already enabled (Closed)
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/memory_tracing_browsertest.cc
diff --git a/content/browser/tracing/memory_tracing_browsertest.cc b/content/browser/tracing/memory_tracing_browsertest.cc
index 80ccfae3df249b4667b6a5de6a5c51bc9194b0ca..ab9b9e3f67d3307d91f5866f63f11bbe439900bd 100644
--- a/content/browser/tracing/memory_tracing_browsertest.cc
+++ b/content/browser/tracing/memory_tracing_browsertest.cc
@@ -13,6 +13,7 @@
#include "base/trace_event/memory_dump_provider.h"
#include "base/trace_event/memory_dump_request_args.h"
#include "base/trace_event/trace_config_memory_test_util.h"
+#include "base/trace_event/trace_log.h"
#include "content/public/browser/tracing_controller.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
@@ -109,6 +110,9 @@ class MemoryTracingTest : public ContentBrowserTest {
}
void EnableMemoryTracing() {
+ CHECK(!base::trace_event::TraceLog::GetInstance()->IsEnabled())
+ << "Tracing seems to be already enabled. Very likely this is because "
+ "the startup tracing file has been leaked from a previous test.";
// Enable tracing without periodic dumps.
base::trace_event::TraceConfig trace_config(
base::trace_event::TraceConfigMemoryTestUtil::
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698