| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/heap/BlinkGCMemoryDumpProvider.h" | 5 #include "platform/heap/BlinkGCMemoryDumpProvider.h" |
| 6 | 6 |
| 7 #include "platform/web_process_memory_dump_impl.h" |
| 7 #include "public/platform/Platform.h" | 8 #include "public/platform/Platform.h" |
| 8 #include "public/platform/WebProcessMemoryDump.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "wtf/Threading.h" | 10 #include "wtf/Threading.h" |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 TEST(BlinkGCDumpProviderTest, MemoryDump) | 14 TEST(BlinkGCDumpProviderTest, MemoryDump) |
| 15 { | 15 { |
| 16 OwnPtr<WebProcessMemoryDump> dump = adoptPtr(Platform::current()->createProc
essMemoryDump()); | 16 OwnPtr<WebProcessMemoryDump> dump = adoptPtr(new WebProcessMemoryDumpImpl())
; |
| 17 ASSERT(dump); | 17 ASSERT(dump); |
| 18 BlinkGCMemoryDumpProvider::instance()->onMemoryDump(WebMemoryDumpLevelOfDeta
il::Detailed, dump.get()); | 18 BlinkGCMemoryDumpProvider::instance()->onMemoryDump(WebMemoryDumpLevelOfDeta
il::Detailed, dump.get()); |
| 19 ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc"))); | 19 ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc"))); |
| 20 ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc/allocated_objec
ts"))); | 20 ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc/allocated_objec
ts"))); |
| 21 } | 21 } |
| 22 | 22 |
| 23 } // namespace blink | 23 } // namespace blink |
| OLD | NEW |