| Index: third_party/WebKit/Source/platform/WebProcessMemoryDumpImplTest.cpp
|
| diff --git a/content/child/web_process_memory_dump_impl_unittest.cc b/third_party/WebKit/Source/platform/WebProcessMemoryDumpImplTest.cpp
|
| similarity index 93%
|
| rename from content/child/web_process_memory_dump_impl_unittest.cc
|
| rename to third_party/WebKit/Source/platform/WebProcessMemoryDumpImplTest.cpp
|
| index 98860ff3af1aecc41a244a64a024c65183c4f949..035ea9757c7247fdb676eaf617e94833fce16496 100644
|
| --- a/content/child/web_process_memory_dump_impl_unittest.cc
|
| +++ b/third_party/WebKit/Source/platform/WebProcessMemoryDumpImplTest.cpp
|
| @@ -2,16 +2,17 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "content/child/web_process_memory_dump_impl.h"
|
| +#include "platform/WebProcessMemoryDumpImpl.h"
|
|
|
| #include "base/trace_event/memory_allocator_dump.h"
|
| #include "base/trace_event/process_memory_dump.h"
|
| #include "base/trace_event/trace_event_argument.h"
|
| #include "base/values.h"
|
| -#include "content/child/web_memory_allocator_dump_impl.h"
|
| +#include "platform/WebMemoryAllocatorDumpImpl.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| +#include "wtf/OwnPtr.h"
|
|
|
| -namespace content {
|
| +namespace blink {
|
|
|
| // Tests that the Chromium<>Blink plumbing that exposes the MemoryInfra classes
|
| // behaves correctly, performs the right transfers of memory ownerships and
|
| @@ -20,13 +21,13 @@ TEST(WebProcessMemoryDumpImplTest, IntegrationTest) {
|
| scoped_refptr<base::trace_event::TracedValue> traced_value(
|
| new base::trace_event::TracedValue());
|
|
|
| - scoped_ptr<WebProcessMemoryDumpImpl> wpmd1(new WebProcessMemoryDumpImpl());
|
| + OwnPtr<WebProcessMemoryDumpImpl> wpmd1(adoptPtr(new WebProcessMemoryDumpImpl()));
|
| auto wmad1 = wpmd1->createMemoryAllocatorDump("1/1");
|
| auto wmad2 = wpmd1->createMemoryAllocatorDump("1/2");
|
| ASSERT_EQ(wmad1, wpmd1->getMemoryAllocatorDump("1/1"));
|
| ASSERT_EQ(wmad2, wpmd1->getMemoryAllocatorDump("1/2"));
|
|
|
| - scoped_ptr<WebProcessMemoryDumpImpl> wpmd2(new WebProcessMemoryDumpImpl());
|
| + OwnPtr<WebProcessMemoryDumpImpl> wpmd2(adoptPtr(new WebProcessMemoryDumpImpl()));
|
| wpmd2->createMemoryAllocatorDump("2/1");
|
| wpmd2->createMemoryAllocatorDump("2/2");
|
|
|
| @@ -72,7 +73,7 @@ TEST(WebProcessMemoryDumpImplTest, IntegrationTest) {
|
|
|
| // Free the |wpmd2| to check that the memory ownership of the two MAD(s)
|
| // has been transferred to |wpmd1|.
|
| - wpmd2.reset();
|
| + wpmd2.clear();
|
|
|
| // Now check that |wpmd1| has been effectively merged.
|
| ASSERT_EQ(4u, wpmd1->process_memory_dump()->allocator_dumps().size());
|
| @@ -118,7 +119,7 @@ TEST(WebProcessMemoryDumpImplTest, IntegrationTest) {
|
| ASSERT_EQ(wmad4->guid(), allocator_dumps_edges[0].source.ToUint64());
|
| ASSERT_EQ(guid, allocator_dumps_edges[0].target.ToUint64());
|
|
|
| - wpmd1.reset();
|
| + wpmd1.clear();
|
| }
|
|
|
| -} // namespace content
|
| +} // namespace blink
|
|
|