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

Side by Side Diff: base/tracked_objects_unittest.cc

Issue 10004001: Add virtual and OVERRIDE to base/ implementation files (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Win Fix -> Missing header Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/tools_sanity_unittest.cc ('k') | base/values_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 // Test of classes in the tracked_objects.h classes. 5 // Test of classes in the tracked_objects.h classes.
6 6
7 #include "base/tracked_objects.h" 7 #include "base/tracked_objects.h"
8 8
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/time.h" 11 #include "base/time.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 namespace tracked_objects { 14 namespace tracked_objects {
15 15
16 class TrackedObjectsTest : public testing::Test { 16 class TrackedObjectsTest : public testing::Test {
17 protected: 17 protected:
18 TrackedObjectsTest() { 18 TrackedObjectsTest() {
19 // On entry, leak any database structures in case they are still in use by 19 // On entry, leak any database structures in case they are still in use by
20 // prior threads. 20 // prior threads.
21 ThreadData::ShutdownSingleThreadedCleanup(true); 21 ThreadData::ShutdownSingleThreadedCleanup(true);
22 } 22 }
23 23
24 ~TrackedObjectsTest() { 24 virtual ~TrackedObjectsTest() {
25 // We should not need to leak any structures we create, since we are 25 // We should not need to leak any structures we create, since we are
26 // single threaded, and carefully accounting for items. 26 // single threaded, and carefully accounting for items.
27 ThreadData::ShutdownSingleThreadedCleanup(false); 27 ThreadData::ShutdownSingleThreadedCleanup(false);
28 } 28 }
29 29
30 // Provide access, since this class is a friend of ThreadData. 30 // Provide access, since this class is a friend of ThreadData.
31 void ShutdownSingleThreadedCleanup(bool leak) { 31 void ShutdownSingleThreadedCleanup(bool leak) {
32 ThreadData::ShutdownSingleThreadedCleanup(leak); 32 ThreadData::ShutdownSingleThreadedCleanup(leak);
33 } 33 }
34 }; 34 };
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 "\"line_number\":999" 813 "\"line_number\":999"
814 "}" 814 "}"
815 "}" 815 "}"
816 "]" 816 "]"
817 "}"; 817 "}";
818 EXPECT_EQ(one_line_result, json); 818 EXPECT_EQ(one_line_result, json);
819 } 819 }
820 820
821 821
822 } // namespace tracked_objects 822 } // namespace tracked_objects
OLDNEW
« no previous file with comments | « base/tools_sanity_unittest.cc ('k') | base/values_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698