Index: gpu/command_buffer/client/mapped_memory_unittest.cc |
diff --git a/gpu/command_buffer/client/mapped_memory_unittest.cc b/gpu/command_buffer/client/mapped_memory_unittest.cc |
index 6430b667d3f4c7683ade442d208ae246040f45bf..d118fac4973f0cff17d53e23eaa56d8bd0074b0f 100644 |
--- a/gpu/command_buffer/client/mapped_memory_unittest.cc |
+++ b/gpu/command_buffer/client/mapped_memory_unittest.cc |
@@ -324,6 +324,10 @@ TEST_F(MappedMemoryManagerTest, UnusedMemoryLimit) { |
EXPECT_NE(-1, id1); |
EXPECT_EQ(0u, offset1); |
+ EXPECT_EQ(kChunkSize, manager_->allocated_memory()); |
+ |
+ manager_->Free(mem1); |
+ |
// Allocate half a chunk worth of memory again. |
// The same chunk will be used. |
int32 id2 = -1; |
@@ -335,9 +339,8 @@ TEST_F(MappedMemoryManagerTest, UnusedMemoryLimit) { |
// Expect two chunks to be allocated, exceeding the limit, |
// since all memory is in use. |
- EXPECT_EQ(2 * kChunkSize, manager_->allocated_memory()); |
+ EXPECT_EQ(kChunkSize, manager_->allocated_memory()); |
- manager_->Free(mem1); |
manager_->Free(mem2); |
} |
@@ -413,7 +416,7 @@ TEST_F(MappedMemoryManagerTest, Poll) { |
manager_.reset(new MappedMemoryManager( |
helper_.get(), |
base::Bind(&Poll, this, &unmanaged_memory_list), |
- kSize)); |
+ kSize*2)); |
// Allocate kSize bytes. Don't add the address to |
// the unmanaged memory list, so that it won't be free:ed just yet. |