| OLD | NEW | 
|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/history_overlay_controller.h" | 5 #import "chrome/browser/ui/cocoa/history_overlay_controller.h" | 
| 6 | 6 | 
| 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" | 
| 8 | 8 | 
| 9 class HistoryOverlayControllerTest : public CocoaTest { | 9 class HistoryOverlayControllerTest : public CocoaTest { | 
| 10  public: | 10  public: | 
| 11   void SetUp() override { | 11   void SetUp() override { | 
| 12     CocoaTest::SetUp(); | 12     CocoaTest::SetUp(); | 
| 13 | 13 | 
| 14     // The overlay controller shows the panel as a subview of the given view. | 14     // The overlay controller shows the panel as a subview of the given view. | 
| 15     test_view_.reset([[NSView alloc] initWithFrame:NSMakeRect(10, 10, 10, 10)]); | 15     test_view_.reset([[NSView alloc] initWithFrame:NSMakeRect(10, 10, 10, 10)]); | 
| 16 | 16 | 
| 17     // We add it to the test_window for authenticity. | 17     // We add it to the test_window for authenticity. | 
| (...skipping 15 matching lines...) Expand all  Loading... | 
| 33   base::scoped_nsobject<HistoryOverlayController> controller( | 33   base::scoped_nsobject<HistoryOverlayController> controller( | 
| 34       [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]); | 34       [[HistoryOverlayController alloc] initForMode:kHistoryOverlayModeBack]); | 
| 35   [controller showPanelForView:test_view()]; | 35   [controller showPanelForView:test_view()]; | 
| 36   EXPECT_EQ(1u, [[test_view() subviews] count]); | 36   EXPECT_EQ(1u, [[test_view() subviews] count]); | 
| 37 | 37 | 
| 38   // We expect the view to be removed from its superview immediately | 38   // We expect the view to be removed from its superview immediately | 
| 39   // after dismiss, even though it may still be animating a fade out. | 39   // after dismiss, even though it may still be animating a fade out. | 
| 40   [controller dismiss]; | 40   [controller dismiss]; | 
| 41   EXPECT_EQ(0u, [[test_view() subviews] count]); | 41   EXPECT_EQ(0u, [[test_view() subviews] count]); | 
| 42 } | 42 } | 
| OLD | NEW | 
|---|