| 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 #include "base/mac/scoped_nsobject.h" | 5 #include "base/mac/scoped_nsobject.h" |
| 6 #import "chrome/browser/ui/cocoa/clickhold_button_cell.h" | 6 #import "chrome/browser/ui/cocoa/clickhold_button_cell.h" |
| 7 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | |
| 8 #import "chrome/browser/ui/cocoa/menu_button.h" | 7 #import "chrome/browser/ui/cocoa/menu_button.h" |
| 8 #import "chrome/browser/ui/cocoa/test/cocoa_test_helper.h" |
| 9 | 9 |
| 10 @interface MenuButtonTestDelegate : NSObject<NSMenuDelegate> { | 10 @interface MenuButtonTestDelegate : NSObject<NSMenuDelegate> { |
| 11 @private | 11 @private |
| 12 base::scoped_nsobject<NSMenu> menu_; | 12 base::scoped_nsobject<NSMenu> menu_; |
| 13 BOOL open_; | 13 BOOL open_; |
| 14 BOOL didOpen_; | 14 BOOL didOpen_; |
| 15 } | 15 } |
| 16 - (BOOL)isOpen; | 16 - (BOOL)isOpen; |
| 17 - (BOOL)didOpen; | 17 - (BOOL)didOpen; |
| 18 @end | 18 @end |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // click are turned on. | 281 // click are turned on. |
| 282 actionNames = [buttonCell accessibilityActionNames]; | 282 actionNames = [buttonCell accessibilityActionNames]; |
| 283 EXPECT_TRUE([actionNames containsObject:NSAccessibilityShowMenuAction]); | 283 EXPECT_TRUE([actionNames containsObject:NSAccessibilityShowMenuAction]); |
| 284 | 284 |
| 285 [buttonCell accessibilityPerformAction:NSAccessibilityShowMenuAction]; | 285 [buttonCell accessibilityPerformAction:NSAccessibilityShowMenuAction]; |
| 286 EXPECT_TRUE([delegate didOpen]); | 286 EXPECT_TRUE([delegate didOpen]); |
| 287 EXPECT_FALSE([delegate isOpen]); | 287 EXPECT_FALSE([delegate isOpen]); |
| 288 } | 288 } |
| 289 | 289 |
| 290 } // namespace | 290 } // namespace |
| OLD | NEW |