Chromium Code Reviews| Index: chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm |
| diff --git a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm |
| index dca3226dacd25ed7b79fcfd80413bfd70944e66a..d6e9ebdc8656cc06e77087160e349dc05c2aeeb2 100644 |
| --- a/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm |
| +++ b/chrome/browser/ui/cocoa/extensions/browser_actions_container_view_unittest.mm |
| @@ -15,18 +15,6 @@ const CGFloat kContainerHeight = 15.0; |
| const CGFloat kMinimumContainerWidth = 3.0; |
| const CGFloat kMaxAllowedWidthForTest = 50.0; |
| -class BrowserActionsContainerTestDelegate |
| - : public BrowserActionsContainerViewSizeDelegate { |
| - public: |
| - BrowserActionsContainerTestDelegate() {} |
| - ~BrowserActionsContainerTestDelegate() override {} |
| - |
| - CGFloat GetMaxAllowedWidth() override { return kMaxAllowedWidthForTest; } |
| - |
| - private: |
| - DISALLOW_COPY_AND_ASSIGN(BrowserActionsContainerTestDelegate); |
| -}; |
| - |
| class BrowserActionsContainerViewTest : public CocoaTest { |
| public: |
| void SetUp() override { |
| @@ -39,13 +27,14 @@ class BrowserActionsContainerViewTest : public CocoaTest { |
| }; |
| TEST_F(BrowserActionsContainerViewTest, BasicTests) { |
| - EXPECT_TRUE([view_ canDragLeft]); |
| - EXPECT_TRUE([view_ canDragRight]); |
| EXPECT_TRUE([view_ isHidden]); |
| } |
| TEST_F(BrowserActionsContainerViewTest, SetWidthTests) { |
| - // Try setting below the minimum width (10 pixels). |
| + [view_ setMinWidth: kMinimumContainerWidth]; |
|
Robert Sesek
2017/01/19 20:55:42
nit: no space after :
|
| + [view_ setMaxWidth: kMaxAllowedWidthForTest]; |
| + |
| + // Try setting below the minimum width. |
| [view_ resizeToWidth:kMinimumContainerWidth - 1 animate:NO]; |
| EXPECT_EQ(kMinimumContainerWidth, NSWidth([view_ frame])) << "Frame width is " |
| << "less than the minimum allowed."; |
| @@ -73,11 +62,8 @@ TEST_F(BrowserActionsContainerViewTest, SetWidthTests) { |
| EXPECT_EQ(35.0, NSWidth([view_ frame])); |
| EXPECT_EQ(35.0, NSWidth([view_ animationEndFrame])); |
| - BrowserActionsContainerTestDelegate delegate; |
| - [view_ setDelegate:&delegate]; |
| [view_ resizeToWidth:kMaxAllowedWidthForTest + 10.0 animate:NO]; |
| EXPECT_EQ(kMaxAllowedWidthForTest, NSWidth([view_ frame])); |
| - [view_ setDelegate:nil]; |
| } |
| } // namespace |