Chromium Code Reviews| 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 fe966660829131db6aa2442692f1e5c05a707fd4..ce0206d788f821bfc6582e2ec87f791a398892e4 100644 |
| --- a/content/browser/tracing/memory_tracing_browsertest.cc |
| +++ b/content/browser/tracing/memory_tracing_browsertest.cc |
| @@ -20,6 +20,7 @@ |
| #include "content/public/test/content_browser_test.h" |
| #include "content/public/test/content_browser_test_utils.h" |
| #include "content/shell/browser/shell.h" |
| +#include "services/resource_coordinator/memory/coordinator/coordinator_impl.h" |
| #include "testing/gmock/include/gmock/gmock.h" |
| using base::trace_event::MemoryDumpArgs; |
| @@ -45,6 +46,7 @@ class MemoryTracingTest : public ContentBrowserTest { |
| void DoRequestGlobalDump(const MemoryDumpType& dump_type, |
| const MemoryDumpLevelOfDetail& level_of_detail, |
| const base::trace_event::MemoryDumpCallback& cb) { |
| + LOG(ERROR) << "MDM::RequestGlobalDump"; |
|
ssid
2017/02/24 23:19:05
Do we need these logs?
chiniforooshan
2017/02/25 00:04:51
Ooops!
|
| MemoryDumpManager::GetInstance()->RequestGlobalDump(dump_type, |
| level_of_detail, cb); |
| } |
| @@ -56,9 +58,11 @@ class MemoryTracingTest : public ContentBrowserTest { |
| uint32_t request_index, |
| uint64_t dump_guid, |
| bool success) { |
| + LOG(ERROR) << "OnGlobalDump: " << request_index; |
| // Make sure we run the RunLoop closure on the same thread that originated |
| // the run loop (which is the IN_PROC_BROWSER_TEST_F main thread). |
| if (!task_runner->RunsTasksOnCurrentThread()) { |
| + LOG(ERROR) << "OnGlobalDump: " << request_index << " (repost)"; |
| task_runner->PostTask( |
| FROM_HERE, base::Bind(&MemoryTracingTest::OnGlobalMemoryDumpDone, |
| base::Unretained(this), task_runner, closure, |
| @@ -68,8 +72,10 @@ class MemoryTracingTest : public ContentBrowserTest { |
| if (success) |
| EXPECT_NE(0u, dump_guid); |
| OnMemoryDumpDone(request_index, success); |
| - if (!closure.is_null()) |
| + if (!closure.is_null()) { |
| + LOG(ERROR) << "OnGlobalDump: " << request_index << " (quit loop)"; |
| closure.Run(); |
| + } |
| } |
| void RequestGlobalDumpWithClosure( |
| @@ -122,6 +128,9 @@ class MemoryTracingTest : public ContentBrowserTest { |
| GetTraceConfig_EmptyTriggers()); |
| base::RunLoop run_loop; |
| + // Start the Coordinator service. |
| + memory_instrumentation::CoordinatorImpl::GetInstance( |
| + base::ThreadTaskRunnerHandle::Get().get()); |
| bool success = TracingController::GetInstance()->StartTracing( |
| trace_config, run_loop.QuitClosure()); |
| EXPECT_TRUE(success); |