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

Side by Side Diff: base/trace_event/heap_profiler_stack_frame_deduplicator_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_stack_frame_deduplicator.h" 7 #include "base/trace_event/heap_profiler_stack_frame_deduplicator.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/googletest/include/gtest/gtest.h"
9 9
10 namespace base { 10 namespace base {
11 namespace trace_event { 11 namespace trace_event {
12 12
13 // Define all strings once, because the deduplicator requires pointer equality, 13 // Define all strings once, because the deduplicator requires pointer equality,
14 // and string interning is unreliable. 14 // and string interning is unreliable.
15 const char kBrowserMain[] = "BrowserMain"; 15 const char kBrowserMain[] = "BrowserMain";
16 const char kRendererMain[] = "RendererMain"; 16 const char kRendererMain[] = "RendererMain";
17 const char kCreateWidget[] = "CreateWidget"; 17 const char kCreateWidget[] = "CreateWidget";
18 const char kInitialize[] = "Initialize"; 18 const char kInitialize[] = "Initialize";
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 113
114 // Inserting the same backtrace again should return the index of the existing 114 // Inserting the same backtrace again should return the index of the existing
115 // node. 115 // node.
116 ASSERT_EQ(1, dedup->Insert(bt0)); 116 ASSERT_EQ(1, dedup->Insert(bt0));
117 ASSERT_EQ(2, dedup->Insert(bt1)); 117 ASSERT_EQ(2, dedup->Insert(bt1));
118 ASSERT_EQ(dedup->begin() + 3, dedup->end()); 118 ASSERT_EQ(dedup->begin() + 3, dedup->end());
119 } 119 }
120 120
121 } // namespace trace_event 121 } // namespace trace_event
122 } // namespace base 122 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698