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/cocoa_protocols.h" | |
6 #include "base/memory/scoped_nsobject.h" | 5 #include "base/memory/scoped_nsobject.h" |
7 #import "chrome/browser/ui/cocoa/clickhold_button_cell.h" | 6 #import "chrome/browser/ui/cocoa/clickhold_button_cell.h" |
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
9 #import "chrome/browser/ui/cocoa/menu_button.h" | 8 #import "chrome/browser/ui/cocoa/menu_button.h" |
10 | 9 |
11 @interface MenuButtonTestDelegate : NSObject<NSMenuDelegate> { | 10 @interface MenuButtonTestDelegate : NSObject<NSMenuDelegate> { |
12 @private | 11 @private |
13 scoped_nsobject<NSMenu> menu_; | 12 scoped_nsobject<NSMenu> menu_; |
14 BOOL open_; | 13 BOOL open_; |
15 BOOL didOpen_; | 14 BOOL didOpen_; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 EXPECT_FALSE([delegate isOpen]); | 179 EXPECT_FALSE([delegate isOpen]); |
181 | 180 |
182 // Should open the menu in this case. | 181 // Should open the menu in this case. |
183 [button_ performClick:nil]; | 182 [button_ performClick:nil]; |
184 | 183 |
185 EXPECT_TRUE([delegate didOpen]); | 184 EXPECT_TRUE([delegate didOpen]); |
186 EXPECT_FALSE([delegate isOpen]); | 185 EXPECT_FALSE([delegate isOpen]); |
187 } | 186 } |
188 | 187 |
189 } // namespace | 188 } // namespace |
OLD | NEW |