| Index: third_party/WebKit/Source/platform/heap/HeapTest.cpp
|
| diff --git a/third_party/WebKit/Source/platform/heap/HeapTest.cpp b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
|
| index 0448e3b7b4bf482d2a6ef4fad9e8fb7a3f516bf5..24117da61ad706840be77d247d045d14dc0127e4 100644
|
| --- a/third_party/WebKit/Source/platform/heap/HeapTest.cpp
|
| +++ b/third_party/WebKit/Source/platform/heap/HeapTest.cpp
|
| @@ -1517,12 +1517,15 @@ class PreFinalizerBackingShrinkForbidden
|
| }
|
|
|
| void Dispose() {
|
| - // Remove elemets so that vector_ will try to shrink.
|
| - for (int i = 0; i < 32; ++i) {
|
| + // Remove all elemets except one so that vector_ will try to shrink.
|
| + for (int i = 1; i < 32; ++i) {
|
| vector_.pop_back();
|
| }
|
| // Check that vector_ hasn't shrunk.
|
| - EXPECT_LT(31ul, map_.Capacity());
|
| + EXPECT_LT(31ul, vector_.Capacity());
|
| + // Just releasing the backing is allowed.
|
| + vector_.Clear();
|
| + EXPECT_EQ(0ul, vector_.Capacity());
|
|
|
| // Remove elemets so that map_ will try to shrink.
|
| for (int i = 0; i < 32; ++i) {
|
|
|