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

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

Issue 1335503003: [tracing] Add test for memory-infra startup tracing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@startup_tracing
Patch Set: Nit Created 5 years, 3 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/trace_event/trace_event.gypi ('k') | 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 8b0a1a9e8ebc066347ae82c3115e1541f3db077c..ed9bb12847c863b34c39d3e2f630cfe5bb526ae1 100644
--- a/content/browser/tracing/memory_tracing_browsertest.cc
+++ b/content/browser/tracing/memory_tracing_browsertest.cc
@@ -9,6 +9,7 @@
#include "base/trace_event/memory_dump_manager.h"
#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 "content/public/browser/tracing_controller.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test_utils.h"
@@ -69,10 +70,6 @@ class MemoryTracingTest : public ContentBrowserTest {
last_callback_dump_guid_ = 0;
last_callback_success_ = false;
- // TODO(primiano): This should be done via TraceConfig.
- // See https://goo.gl/5Hj3o0.
- MemoryDumpManager::GetInstance()->DisablePeriodicDumpsForTesting();
-
mock_dump_provider_.reset(new MockDumpProvider());
MemoryDumpManager::GetInstance()->RegisterDumpProvider(
mock_dump_provider_.get());
@@ -87,9 +84,12 @@ class MemoryTracingTest : public ContentBrowserTest {
}
void EnableMemoryTracing() {
+ // Enable tracing without periodic dumps.
+ base::trace_event::TraceConfig trace_config(
+ base::trace_event::TraceConfigMemoryTestUtil::
+ GetTraceConfig_EmptyTriggers());
+
base::RunLoop run_loop;
- std::string category_filter = MemoryDumpManager::kTraceCategory;
- base::trace_event::TraceConfig trace_config(category_filter, "");
bool success = TracingController::GetInstance()->EnableRecording(
trace_config, run_loop.QuitClosure());
EXPECT_TRUE(success);
« no previous file with comments | « base/trace_event/trace_event.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698