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

Side by Side Diff: ui/wm/core/window_util_unittest.cc

Issue 220813004: Reset the window before its acquired layer is deleted (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/wm/core/window_util.h" 5 #include "ui/wm/core/window_util.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "ui/aura/test/aura_test_base.h" 8 #include "ui/aura/test/aura_test_base.h"
9 #include "ui/aura/test/test_windows.h" 9 #include "ui/aura/test/test_windows.h"
10 #include "ui/aura/window.h" 10 #include "ui/aura/window.h"
(...skipping 27 matching lines...) Expand all
38 // already been detached. 38 // already been detached.
39 ASSERT_EQ(1u, tree->root()->children().size()); 39 ASSERT_EQ(1u, tree->root()->children().size());
40 // Child layer is new instance. 40 // Child layer is new instance.
41 EXPECT_NE(window11->layer(), tree->root()->children()[0]); 41 EXPECT_NE(window11->layer(), tree->root()->children()[0]);
42 EXPECT_NE(window12->layer(), tree->root()->children()[0]); 42 EXPECT_NE(window12->layer(), tree->root()->children()[0]);
43 43
44 // The original window should have both. 44 // The original window should have both.
45 ASSERT_EQ(2u, window1->layer()->children().size()); 45 ASSERT_EQ(2u, window1->layer()->children().size());
46 EXPECT_EQ(window11->layer(), window1->layer()->children()[0]); 46 EXPECT_EQ(window11->layer(), window1->layer()->children()[0]);
47 EXPECT_EQ(window12->layer(), window1->layer()->children()[1]); 47 EXPECT_EQ(window12->layer(), window1->layer()->children()[1]);
48
49 // Delete the window before the acquired layer is deleted.
50 window11.reset();
48 } 51 }
49 } // namespace wm 52 } // namespace wm
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698