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

Side by Side Diff: base/trace_event/heap_profiler_allocation_context_tracker_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/memory/ref_counted.h" 5 #include "base/memory/ref_counted.h"
6 #include "base/trace_event/heap_profiler_allocation_context.h" 6 #include "base/trace_event/heap_profiler_allocation_context.h"
7 #include "base/trace_event/heap_profiler_allocation_context_tracker.h" 7 #include "base/trace_event/heap_profiler_allocation_context_tracker.h"
8 #include "base/trace_event/trace_event.h" 8 #include "base/trace_event/trace_event.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/googletest/include/gtest/gtest.h"
10 10
11 namespace base { 11 namespace base {
12 namespace trace_event { 12 namespace trace_event {
13 13
14 // Define all strings once, because the pseudo stack requires pointer equality, 14 // Define all strings once, because the pseudo stack requires pointer equality,
15 // and string interning is unreliable. 15 // and string interning is unreliable.
16 const char kCupcake[] = "Cupcake"; 16 const char kCupcake[] = "Cupcake";
17 const char kDonut[] = "Donut"; 17 const char kDonut[] = "Donut";
18 const char kEclair[] = "Eclair"; 18 const char kEclair[] = "Eclair";
19 const char kFroyo[] = "Froyo"; 19 const char kFroyo[] = "Froyo";
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 { 220 {
221 AllocationContext ctx = AllocationContextTracker::GetContextSnapshot(); 221 AllocationContext ctx = AllocationContextTracker::GetContextSnapshot();
222 ASSERT_EQ(kCupcake, ctx.backtrace.frames[0]); 222 ASSERT_EQ(kCupcake, ctx.backtrace.frames[0]);
223 ASSERT_EQ(kFroyo, ctx.backtrace.frames[11]); 223 ASSERT_EQ(kFroyo, ctx.backtrace.frames[11]);
224 } 224 }
225 } 225 }
226 226
227 } // namespace trace_event 227 } // namespace trace_event
228 } // namespace base 228 } // namespace base
OLDNEW
« no previous file with comments | « base/tools_sanity_unittest.cc ('k') | base/trace_event/heap_profiler_allocation_register_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698