| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 |
| 9 #include "base/message_loop.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 11 |
| 10 namespace tracked_objects { | 12 namespace tracked_objects { |
| 11 | 13 |
| 12 class TrackedObjectsTest : public testing::Test { | 14 class TrackedObjectsTest : public testing::Test { |
| 13 public: | 15 public: |
| 14 MessageLoop message_loop_; | 16 MessageLoop message_loop_; |
| 15 }; | 17 }; |
| 16 | 18 |
| 17 TEST_F(TrackedObjectsTest, MinimalStartupShutdown) { | 19 TEST_F(TrackedObjectsTest, MinimalStartupShutdown) { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 EXPECT_EQ(1u, death_map.size()); // 1 location. | 87 EXPECT_EQ(1u, death_map.size()); // 1 location. |
| 86 EXPECT_EQ(1, death_map.begin()->second.count()); // 1 death. | 88 EXPECT_EQ(1, death_map.begin()->second.count()); // 1 death. |
| 87 | 89 |
| 88 // The births were at the same location as the one known death. | 90 // The births were at the same location as the one known death. |
| 89 EXPECT_EQ(birth_map.begin()->second, death_map.begin()->first); | 91 EXPECT_EQ(birth_map.begin()->second, death_map.begin()->first); |
| 90 | 92 |
| 91 ThreadData::ShutdownSingleThreadedCleanup(); | 93 ThreadData::ShutdownSingleThreadedCleanup(); |
| 92 } | 94 } |
| 93 | 95 |
| 94 } // namespace tracked_objects | 96 } // namespace tracked_objects |
| OLD | NEW |