| 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 732b5c8086652d9d7be8724e60db8c546e96c16b..a8101b509c2fde9ca5a7720d82700827ab6c931b 100644
|
| --- a/base/trace_event/memory_dump_manager_unittest.cc
|
| +++ b/base/trace_event/memory_dump_manager_unittest.cc
|
| @@ -1013,44 +1013,6 @@ TEST_F(MemoryDumpManagerTest, TraceConfigExpectationsWhenIsCoordinator) {
|
| DisableTracing();
|
| }
|
|
|
| -// Tests against race conditions that can happen if tracing is disabled before
|
| -// the CreateProcessDump() call. Real-world regression: crbug.com/580295 .
|
| -TEST_F(MemoryDumpManagerTest, DisableTracingRightBeforeStartOfDump) {
|
| - base::WaitableEvent tracing_disabled_event(
|
| - WaitableEvent::ResetPolicy::AUTOMATIC,
|
| - WaitableEvent::InitialState::NOT_SIGNALED);
|
| - InitializeMemoryDumpManager(false /* is_coordinator */);
|
| -
|
| - std::unique_ptr<Thread> mdp_thread(new Thread("test thread"));
|
| - mdp_thread->Start();
|
| -
|
| - // Create both same-thread MDP and another MDP with dedicated thread
|
| - MockMemoryDumpProvider mdp1;
|
| - RegisterDumpProvider(&mdp1, nullptr);
|
| - MockMemoryDumpProvider mdp2;
|
| - RegisterDumpProvider(&mdp2, mdp_thread->task_runner(), kDefaultOptions);
|
| - EnableTracingWithLegacyCategories(MemoryDumpManager::kTraceCategory);
|
| -
|
| - EXPECT_CALL(global_dump_handler_, RequestGlobalMemoryDump(_, _))
|
| - .WillOnce(Invoke([this](const MemoryDumpRequestArgs& args,
|
| - const GlobalMemoryDumpCallback& callback) {
|
| - DisableTracing();
|
| - ProcessMemoryDumpCallback process_callback =
|
| - Bind(&ProcessDumpCallbackAdapter, callback);
|
| - mdm_->CreateProcessDump(args, process_callback);
|
| - }));
|
| -
|
| - // If tracing is disabled for current session CreateProcessDump() should NOT
|
| - // request dumps from providers. Real-world regression: crbug.com/600570 .
|
| - EXPECT_CALL(mdp1, OnMemoryDump(_, _)).Times(0);
|
| - EXPECT_CALL(mdp2, OnMemoryDump(_, _)).Times(0);
|
| -
|
| - last_callback_success_ = true;
|
| - RequestGlobalDumpAndWait(MemoryDumpType::EXPLICITLY_TRIGGERED,
|
| - MemoryDumpLevelOfDetail::DETAILED);
|
| - EXPECT_FALSE(last_callback_success_);
|
| -}
|
| -
|
| TEST_F(MemoryDumpManagerTest, DumpOnBehalfOfOtherProcess) {
|
| using trace_analyzer::Query;
|
|
|
|
|