| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/mac/scoped_nsobject.h" | 5 #include "base/mac/scoped_nsobject.h" |
| 6 #include "base/macros.h" | 6 #include "base/macros.h" |
| 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 8 #import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h" | 7 #import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h" |
| 8 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "testing/platform_test.h" | 10 #include "testing/platform_test.h" |
| 11 | 11 |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 const CGFloat kContainerHeight = 15.0; | 14 const CGFloat kContainerHeight = 15.0; |
| 15 const CGFloat kMinimumContainerWidth = 3.0; | 15 const CGFloat kMinimumContainerWidth = 3.0; |
| 16 const CGFloat kMaxAllowedWidthForTest = 50.0; | 16 const CGFloat kMaxAllowedWidthForTest = 50.0; |
| 17 | 17 |
| 18 class BrowserActionsContainerTestDelegate | 18 class BrowserActionsContainerTestDelegate |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 EXPECT_EQ(35.0, NSWidth([view_ animationEndFrame])); | 74 EXPECT_EQ(35.0, NSWidth([view_ animationEndFrame])); |
| 75 | 75 |
| 76 BrowserActionsContainerTestDelegate delegate; | 76 BrowserActionsContainerTestDelegate delegate; |
| 77 [view_ setDelegate:&delegate]; | 77 [view_ setDelegate:&delegate]; |
| 78 [view_ resizeToWidth:kMaxAllowedWidthForTest + 10.0 animate:NO]; | 78 [view_ resizeToWidth:kMaxAllowedWidthForTest + 10.0 animate:NO]; |
| 79 EXPECT_EQ(kMaxAllowedWidthForTest, NSWidth([view_ frame])); | 79 EXPECT_EQ(kMaxAllowedWidthForTest, NSWidth([view_ frame])); |
| 80 [view_ setDelegate:nil]; | 80 [view_ setDelegate:nil]; |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace | 83 } // namespace |
| OLD | NEW |