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

Unified Diff: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp

Issue 1977783002: BlinkGCMemoryDumpProvider should inherit from MemoryDumpProvider directly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp
index 12369461e2266b216437000964edf9f7f3801267..bd8841a6b42289fd1622c1456cd19f5f006a83d9 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp
+++ b/third_party/WebKit/Source/platform/heap/BlinkGCMemoryDumpProviderTest.cpp
@@ -4,7 +4,7 @@
#include "platform/heap/BlinkGCMemoryDumpProvider.h"
-#include "platform/web_process_memory_dump_impl.h"
+#include "base/trace_event/process_memory_dump.h"
#include "public/platform/Platform.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "wtf/Threading.h"
@@ -13,11 +13,11 @@ namespace blink {
TEST(BlinkGCDumpProviderTest, MemoryDump)
{
- OwnPtr<WebProcessMemoryDump> dump = adoptPtr(new WebProcessMemoryDumpImpl());
- ASSERT(dump);
- BlinkGCMemoryDumpProvider::instance()->onMemoryDump(WebMemoryDumpLevelOfDetail::Detailed, dump.get());
- ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc")));
- ASSERT(dump->getMemoryAllocatorDump(String::format("blink_gc/allocated_objects")));
+ base::trace_event::MemoryDumpArgs args = { base::trace_event::MemoryDumpLevelOfDetail::DETAILED };
+ std::unique_ptr<base::trace_event::ProcessMemoryDump> dump(new base::trace_event::ProcessMemoryDump(nullptr));
+ BlinkGCMemoryDumpProvider::instance()->OnMemoryDump(args, dump.get());
+ DCHECK(dump->GetAllocatorDump("blink_gc"));
+ DCHECK(dump->GetAllocatorDump("blink_gc/allocated_objects"));
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698