| Index: cc/base/sidecar_list_container_unittest.cc
|
| diff --git a/cc/base/sidecar_list_container_unittest.cc b/cc/base/sidecar_list_container_unittest.cc
|
| index d8fc9ef2ff5c9d21bf9ccd81946932f62130e074..0012014df8f9d1a3b32df59952ec543e3a655a29 100644
|
| --- a/cc/base/sidecar_list_container_unittest.cc
|
| +++ b/cc/base/sidecar_list_container_unittest.cc
|
| @@ -182,5 +182,17 @@ TEST(SidecarListContainerTest, AddingAndRemovingElements) {
|
| EXPECT_EQ(container.end(), container.begin());
|
| }
|
|
|
| +TEST(SidecarListContainerTest, RemoveLast) {
|
| + // We need only ensure that the sidecar is also destroyed on RemoveLast.
|
| + // The rest is logic already present in ListContainer.
|
| + bool sidecar_destroyed = false;
|
| + TestContainer container;
|
| + TestElement* element = container.AllocateAndConstruct<TestElement>();
|
| + new (container.GetSidecar(element)) TestSidecar(&sidecar_destroyed);
|
| + ASSERT_FALSE(sidecar_destroyed);
|
| + container.RemoveLast();
|
| + ASSERT_TRUE(sidecar_destroyed);
|
| +}
|
| +
|
| } // namespace
|
| } // namespace cc
|
|
|