| 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 "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 Loading... |
| 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 |
| OLD | NEW |