Index: ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc |
=================================================================== |
--- ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc (revision 149223) |
+++ ui/views/controls/tabbed_pane/tabbed_pane_unittest.cc (working copy) |
@@ -100,6 +100,12 @@ |
// If we switch to the other tab, it should get assigned the same bounds. |
tabbed_pane->SelectTabAt(1); |
EXPECT_EQ(bounds, child2->bounds()); |
+ |
+ // Clean up. |
+ delete tabbed_pane->RemoveTabAtIndex(0); |
+ EXPECT_EQ(1, tabbed_pane->GetTabCount()); |
+ delete tabbed_pane->RemoveTabAtIndex(0); |
+ EXPECT_EQ(0, tabbed_pane->GetTabCount()); |
} |
void TabbedPaneTest::TestAddRemove(TabbedPane* tabbed_pane) { |
@@ -142,6 +148,13 @@ |
// Remove the first one. |
delete tabbed_pane->RemoveTabAtIndex(0); |
EXPECT_EQ(0, tabbed_pane->GetSelectedTabIndex()); |
+ |
+ // Clean up the other panes. |
+ EXPECT_EQ(3, tabbed_pane->GetTabCount()); |
+ delete tabbed_pane->RemoveTabAtIndex(0); |
+ delete tabbed_pane->RemoveTabAtIndex(0); |
+ delete tabbed_pane->RemoveTabAtIndex(0); |
+ EXPECT_EQ(0, tabbed_pane->GetTabCount()); |
} |
// Tests TabbedPane::GetPreferredSize() and TabbedPane::Layout(). |
@@ -167,4 +180,4 @@ |
#endif |
} |
-} // namespace views |
+} // namespace views |