Index: components/html_viewer/discardable_memory_allocator_unittest.cc |
diff --git a/components/html_viewer/discardable_memory_allocator_unittest.cc b/components/html_viewer/discardable_memory_allocator_unittest.cc |
index cc73fb0cbbfb115d8cde3b543767967ffd9a24c5..95cea2950bafdd45c08303f83e6da6c295f46487 100644 |
--- a/components/html_viewer/discardable_memory_allocator_unittest.cc |
+++ b/components/html_viewer/discardable_memory_allocator_unittest.cc |
@@ -15,23 +15,16 @@ const size_t kAlmostOneMegabyte = 1023 * kOneKilobyte; |
const size_t kOneMegabyte = 1024 * kOneKilobyte; |
TEST(DiscardableMemoryAllocator, Basic) { |
+ DiscardableMemoryAllocator allocator(kOneMegabyte); |
scoped_ptr<base::DiscardableMemory> chunk; |
- |
- { |
- DiscardableMemoryAllocator allocator(kOneMegabyte); |
- |
- // Make sure the chunk is locked when allocated. In debug mode, we will |
- // dcheck. |
- chunk = allocator.AllocateLockedDiscardableMemory(kOneKilobyte); |
- chunk->Unlock(); |
- |
- // Make sure we can lock a chunk. |
- EXPECT_TRUE(chunk->Lock()); |
- chunk->Unlock(); |
- } |
- |
- // The chunk's backing should have disappeared with the allocator. |
- EXPECT_FALSE(chunk->Lock()); |
+ // Make sure the chunk is locked when allocated. In debug mode, we will |
+ // dcheck. |
+ chunk = allocator.AllocateLockedDiscardableMemory(kOneKilobyte); |
+ chunk->Unlock(); |
+ |
+ // Make sure we can lock a chunk. |
+ EXPECT_TRUE(chunk->Lock()); |
+ chunk->Unlock(); |
} |
TEST(DiscardableMemoryAllocator, DiscardChunks) { |