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 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
7 #import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h" | 8 #import "chrome/browser/ui/cocoa/extensions/browser_actions_container_view.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "testing/platform_test.h" | 10 #include "testing/platform_test.h" |
10 | 11 |
11 namespace { | 12 namespace { |
12 | 13 |
13 const CGFloat kContainerHeight = 15.0; | 14 const CGFloat kContainerHeight = 15.0; |
14 const CGFloat kMinimumContainerWidth = 3.0; | 15 const CGFloat kMinimumContainerWidth = 3.0; |
15 const CGFloat kMaxAllowedWidthForTest = 50.0; | 16 const CGFloat kMaxAllowedWidthForTest = 50.0; |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 EXPECT_EQ(35.0, NSWidth([view_ animationEndFrame])); | 74 EXPECT_EQ(35.0, NSWidth([view_ animationEndFrame])); |
74 | 75 |
75 BrowserActionsContainerTestDelegate delegate; | 76 BrowserActionsContainerTestDelegate delegate; |
76 [view_ setDelegate:&delegate]; | 77 [view_ setDelegate:&delegate]; |
77 [view_ resizeToWidth:kMaxAllowedWidthForTest + 10.0 animate:NO]; | 78 [view_ resizeToWidth:kMaxAllowedWidthForTest + 10.0 animate:NO]; |
78 EXPECT_EQ(kMaxAllowedWidthForTest, NSWidth([view_ frame])); | 79 EXPECT_EQ(kMaxAllowedWidthForTest, NSWidth([view_ frame])); |
79 [view_ setDelegate:nil]; | 80 [view_ setDelegate:nil]; |
80 } | 81 } |
81 | 82 |
82 } // namespace | 83 } // namespace |
OLD | NEW |