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

Unified Diff: base/trace_event/memory_dump_manager_unittest.cc

Issue 2041583003: [tracing] Introduce "allowed_dump_modes" for memory dump config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@background_config
Patch Set: rebase on 2049143002 Created 4 years, 6 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: base/trace_event/memory_dump_manager_unittest.cc
diff --git a/base/trace_event/memory_dump_manager_unittest.cc b/base/trace_event/memory_dump_manager_unittest.cc
index 2b49228395b29d6c776489ae36b5c4734e9f55a4..0a5f39d3b12a2901ce1a0b39b7f9d59f4287f8f8 100644
--- a/base/trace_event/memory_dump_manager_unittest.cc
+++ b/base/trace_event/memory_dump_manager_unittest.cc
@@ -1149,6 +1149,17 @@ TEST_F(MemoryDumpManagerTest, TestBackgroundTracingSetup) {
EnableTracingWithTraceConfig(
TraceConfigMemoryTestUtil::GetTraceConfig_BackgroundTrigger());
+
+ // Only background mode dumps should be allowed with the trace config.
+ last_callback_success_ = false;
+ RequestGlobalDumpAndWait(MemoryDumpType::EXPLICITLY_TRIGGERED,
+ MemoryDumpLevelOfDetail::LIGHT);
+ EXPECT_FALSE(last_callback_success_);
+ last_callback_success_ = false;
+ RequestGlobalDumpAndWait(MemoryDumpType::EXPLICITLY_TRIGGERED,
+ MemoryDumpLevelOfDetail::DETAILED);
+ EXPECT_FALSE(last_callback_success_);
+
ASSERT_TRUE(IsPeriodicDumpingEnabled());
run_loop.Run();
DisableTracing();

Powered by Google App Engine
This is Rietveld 408576698