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 6fa6624e1eb159a0da1010562226a10aacb73dab..73845b26f857c27dece9a60aa7cf0406eac80a86 100644 |
--- a/base/trace_event/memory_dump_manager_unittest.cc |
+++ b/base/trace_event/memory_dump_manager_unittest.cc |
@@ -1148,6 +1148,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(); |