| Index: chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm b/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| index f92ccb92b86c0c463068a2c1c72cc56b2c1b2054..d550f81eaa8b837e9ebaef0e9359a7ead85db017 100644
|
| --- a/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/history_overlay_controller_unittest.mm
|
| @@ -31,9 +31,10 @@ class HistoryOverlayControllerTest : public CocoaTest {
|
| base::scoped_nsobject<NSView> test_view_;
|
| };
|
|
|
| -// Tests that the controller's view gets removed from the hierarchy when the
|
| -// controller is deallocated.
|
| -TEST_F(HistoryOverlayControllerTest, RemovedViewWhenDeallocated) {
|
| +// Tests that when the controller is |-dismiss|ed, the animation runs and then
|
| +// is removed when the animation completes. The view should be added and
|
| +// removed at the appropriate times.
|
| +TEST_F(HistoryOverlayControllerTest, DismissClearsAnimationsAndRemovesView) {
|
| NSView* content_view = [test_window() contentView];
|
| EXPECT_EQ(1u, [[content_view subviews] count]);
|
|
|
| @@ -42,17 +43,6 @@ TEST_F(HistoryOverlayControllerTest, RemovedViewWhenDeallocated) {
|
| [controller showPanelForView:test_view()];
|
| EXPECT_EQ(2u, [[content_view subviews] count]);
|
|
|
| - controller.reset();
|
| - EXPECT_EQ(1u, [[content_view subviews] count]);
|
| -}
|
| -
|
| -// Tests that when the controller is |-dismiss|ed, the animation runs and then
|
| -// is removed when the animation completes.
|
| -TEST_F(HistoryOverlayControllerTest, DismissClearsAnimations) {
|
| - base::scoped_nsobject<HistoryOverlayController> controller(
|
| - [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]);
|
| - [controller showPanelForView:test_view()];
|
| -
|
| scoped_ptr<base::MessagePumpNSRunLoop> message_pump(
|
| new base::MessagePumpNSRunLoop);
|
|
|
| @@ -87,4 +77,6 @@ TEST_F(HistoryOverlayControllerTest, DismissClearsAnimations) {
|
|
|
| // After the animation runs, there should be no more animations.
|
| EXPECT_FALSE([[controller view] animations]);
|
| +
|
| + EXPECT_EQ(1u, [[content_view subviews] count]);
|
| }
|
|
|