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

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

Issue 1440593004: Make operators on scoped_ptr match the ones defined for std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrequals: some-more-compile-fixes Created 5 years, 1 month 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/memory_dump_manager.h" 5 #include "base/trace_event/memory_dump_manager.h"
6 6
7 #include "base/bind_helpers.h" 7 #include "base/bind_helpers.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 class MemoryDumpManagerTest : public testing::Test { 96 class MemoryDumpManagerTest : public testing::Test {
97 public: 97 public:
98 MemoryDumpManagerTest() : testing::Test(), kDefaultOptions() {} 98 MemoryDumpManagerTest() : testing::Test(), kDefaultOptions() {}
99 99
100 void SetUp() override { 100 void SetUp() override {
101 last_callback_success_ = false; 101 last_callback_success_ = false;
102 message_loop_.reset(new MessageLoop()); 102 message_loop_.reset(new MessageLoop());
103 mdm_.reset(new MemoryDumpManager()); 103 mdm_.reset(new MemoryDumpManager());
104 MemoryDumpManager::SetInstanceForTesting(mdm_.get()); 104 MemoryDumpManager::SetInstanceForTesting(mdm_.get());
105 ASSERT_EQ(mdm_, MemoryDumpManager::GetInstance()); 105 ASSERT_EQ(mdm_.get(), MemoryDumpManager::GetInstance());
106 delegate_.reset(new MemoryDumpManagerDelegateForTesting); 106 delegate_.reset(new MemoryDumpManagerDelegateForTesting);
107 } 107 }
108 108
109 void TearDown() override { 109 void TearDown() override {
110 MemoryDumpManager::SetInstanceForTesting(nullptr); 110 MemoryDumpManager::SetInstanceForTesting(nullptr);
111 mdm_.reset(); 111 mdm_.reset();
112 delegate_.reset(); 112 delegate_.reset();
113 message_loop_.reset(); 113 message_loop_.reset();
114 TraceLog::DeleteForTesting(); 114 TraceLog::DeleteForTesting();
115 } 115 }
(...skipping 702 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(123))); 818 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(123)));
819 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(456))); 819 ASSERT_EQ(1u, trace_analyzer::CountMatches(events, Query::EventPidIs(456)));
820 ASSERT_EQ(1u, trace_analyzer::CountMatches( 820 ASSERT_EQ(1u, trace_analyzer::CountMatches(
821 events, Query::EventPidIs(GetCurrentProcId()))); 821 events, Query::EventPidIs(GetCurrentProcId())));
822 ASSERT_EQ(events[0]->id, events[1]->id); 822 ASSERT_EQ(events[0]->id, events[1]->id);
823 ASSERT_EQ(events[0]->id, events[2]->id); 823 ASSERT_EQ(events[0]->id, events[2]->id);
824 } 824 }
825 825
826 } // namespace trace_event 826 } // namespace trace_event
827 } // namespace base 827 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698