| Index: base/tracked_objects_unittest.cc
|
| ===================================================================
|
| --- base/tracked_objects_unittest.cc (revision 107938)
|
| +++ base/tracked_objects_unittest.cc (working copy)
|
| @@ -16,11 +16,15 @@
|
| class TrackedObjectsTest : public testing::Test {
|
| public:
|
| TrackedObjectsTest() {
|
| - ThreadData::ShutdownSingleThreadedCleanup();
|
| + // On entry, leak any database structures in case they are still in use by
|
| + // prior threads.
|
| + ThreadData::ShutdownSingleThreadedCleanup(true);
|
| }
|
|
|
| ~TrackedObjectsTest() {
|
| - ThreadData::ShutdownSingleThreadedCleanup();
|
| + // We should not need to leak any structures we create, since we are
|
| + // single threaded, and carefully accounting for items.
|
| + ThreadData::ShutdownSingleThreadedCleanup(false);
|
| }
|
| };
|
|
|
| @@ -41,7 +45,8 @@
|
| ThreadData::DeathMap death_map;
|
| data->SnapshotDeathMap(&death_map);
|
| EXPECT_EQ(0u, death_map.size());
|
| - ThreadData::ShutdownSingleThreadedCleanup();
|
| + // Cleanup with no leaking.
|
| + ThreadData::ShutdownSingleThreadedCleanup(false);
|
|
|
| // Do it again, just to be sure we reset state completely.
|
| ThreadData::InitializeAndSetTrackingStatus(true);
|
| @@ -138,7 +143,7 @@
|
| EXPECT_TRUE(dictionary->GetInteger("run_ms", &integer));
|
| EXPECT_EQ(integer, 2 * run_ms);
|
| EXPECT_TRUE(dictionary->GetInteger("queue_ms", &integer));
|
| - EXPECT_EQ(integer, 2* queue_ms);
|
| + EXPECT_EQ(integer, 2 * queue_ms);
|
| EXPECT_TRUE(dictionary->GetInteger("count", &integer));
|
| EXPECT_EQ(integer, 2);
|
|
|
|
|