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

Side by Side Diff: base/trace_event/process_memory_dump_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
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 "base/trace_event/process_memory_dump.h" 5 #include "base/trace_event/process_memory_dump.h"
6 6
7 #include "base/memory/aligned_memory.h" 7 #include "base/memory/aligned_memory.h"
8 #include "base/process/process_metrics.h" 8 #include "base/process/process_metrics.h"
9 #include "base/trace_event/memory_allocator_dump_guid.h" 9 #include "base/trace_event/memory_allocator_dump_guid.h"
10 #include "base/trace_event/trace_event_argument.h" 10 #include "base/trace_event/trace_event_argument.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/googletest/include/gtest/gtest.h"
12 12
13 namespace base { 13 namespace base {
14 namespace trace_event { 14 namespace trace_event {
15 15
16 TEST(ProcessMemoryDumpTest, Clear) { 16 TEST(ProcessMemoryDumpTest, Clear) {
17 scoped_ptr<ProcessMemoryDump> pmd1(new ProcessMemoryDump(nullptr)); 17 scoped_ptr<ProcessMemoryDump> pmd1(new ProcessMemoryDump(nullptr));
18 pmd1->CreateAllocatorDump("mad1"); 18 pmd1->CreateAllocatorDump("mad1");
19 pmd1->CreateAllocatorDump("mad2"); 19 pmd1->CreateAllocatorDump("mad2");
20 ASSERT_FALSE(pmd1->allocator_dumps().empty()); 20 ASSERT_FALSE(pmd1->allocator_dumps().empty());
21 21
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 static_cast<char*>(base::AlignedAlloc(kVeryLargeMemorySize, page_size))); 173 static_cast<char*>(base::AlignedAlloc(kVeryLargeMemorySize, page_size)));
174 memset(memory2.get(), 0, kVeryLargeMemorySize); 174 memset(memory2.get(), 0, kVeryLargeMemorySize);
175 size_t res2 = ProcessMemoryDump::CountResidentBytes(memory2.get(), 175 size_t res2 = ProcessMemoryDump::CountResidentBytes(memory2.get(),
176 kVeryLargeMemorySize); 176 kVeryLargeMemorySize);
177 ASSERT_EQ(res2, kVeryLargeMemorySize); 177 ASSERT_EQ(res2, kVeryLargeMemorySize);
178 } 178 }
179 #endif // defined(COUNT_RESIDENT_BYTES_SUPPORTED) 179 #endif // defined(COUNT_RESIDENT_BYTES_SUPPORTED)
180 180
181 } // namespace trace_event 181 } // namespace trace_event
182 } // namespace base 182 } // namespace base
OLDNEW
« no previous file with comments | « base/trace_event/memory_dump_manager_unittest.cc ('k') | base/trace_event/process_memory_maps_dump_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698