Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1110)

Unified Diff: ui/views/view_unittest.cc

Issue 9333005: Fix some memory leaks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/view_unittest.cc
diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc
index 9e55992b46520259741fd5b93cd93e3828e5f08a..a063c147daba6af27324c527bf1068fc5c3e470e 100644
--- a/ui/views/view_unittest.cc
+++ b/ui/views/view_unittest.cc
@@ -2828,11 +2828,14 @@ TEST_F(ViewLayerTest, OrphanLayerAfterViewRemove) {
EXPECT_TRUE(v2->layer()->IsDrawn());
content_view->RemoveChildView(v1);
+
EXPECT_FALSE(LayerIsAncestor(widget()->GetCompositor()->root_layer(),
v2->layer()));
// Reparent |v2|.
content_view->AddChildView(v2);
+ delete v1;
+ v1 = NULL;
EXPECT_TRUE(LayerIsAncestor(widget()->GetCompositor()->root_layer(),
v2->layer()));
EXPECT_TRUE(v2->layer()->IsDrawn());
« no previous file with comments | « ui/base/x/x11_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698