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

Unified Diff: base/tracked_objects_unittest.cc

Issue 7029038: Remove default initializtion of BirthPlace in Tracked. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright fix Created 9 years, 6 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/tracked.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked_objects_unittest.cc
diff --git a/base/tracked_objects_unittest.cc b/base/tracked_objects_unittest.cc
index ab615da1f1af10b263856522137138b8bf29dfd8..e7d07a7bc80961dafb0782c776d9817dcc16fc47 100644
--- a/base/tracked_objects_unittest.cc
+++ b/base/tracked_objects_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -60,10 +60,12 @@ TEST_F(TrackedObjectsTest, TinyStartupShutdown) {
return;
// Instigate tracking on a single tracked object, or our thread.
+ const Location& location = FROM_HERE;
NoopTracked tracked;
+ tracked.SetBirthPlace(location);
const ThreadData* data = ThreadData::first();
- EXPECT_TRUE(data);
+ ASSERT_TRUE(data);
EXPECT_TRUE(!data->next());
EXPECT_EQ(data, ThreadData::current());
ThreadData::BirthMap birth_map;
@@ -76,7 +78,9 @@ TEST_F(TrackedObjectsTest, TinyStartupShutdown) {
// Now instigate a birth, and a death.
- delete new NoopTracked;
+ NoopTracked* new_tracked = new NoopTracked;
+ new_tracked->SetBirthPlace(location);
+ delete new_tracked;
birth_map.clear();
data->SnapshotBirthMap(&birth_map);
« no previous file with comments | « base/tracked.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698