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 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #import "base/memory/scoped_nsobject.h" | 7 #import "base/memory/scoped_nsobject.h" |
| 8 #include "base/prefs/pref_service.h" |
8 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
10 #include "chrome/browser/ui/browser_command_controller.h" | 11 #include "chrome/browser/ui/browser_command_controller.h" |
11 #include "chrome/browser/ui/browser_commands.h" | 12 #include "chrome/browser/ui/browser_commands.h" |
12 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" | 13 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" |
13 #import "chrome/browser/ui/cocoa/gradient_button_cell.h" | 14 #import "chrome/browser/ui/cocoa/gradient_button_cell.h" |
14 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" | 15 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" |
15 #import "chrome/browser/ui/cocoa/view_resizer_pong.h" | 16 #import "chrome/browser/ui/cocoa/view_resizer_pong.h" |
16 #include "chrome/browser/prefs/pref_service.h" | |
17 #include "chrome/common/pref_names.h" | 17 #include "chrome/common/pref_names.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "testing/platform_test.h" | 19 #include "testing/platform_test.h" |
20 | 20 |
21 // An NSView that fakes out hitTest:. | 21 // An NSView that fakes out hitTest:. |
22 @interface HitView : NSView { | 22 @interface HitView : NSView { |
23 id hitTestReturn_; | 23 id hitTestReturn_; |
24 } | 24 } |
25 @end | 25 @end |
26 | 26 |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 [view setHitTestReturn:button]; | 237 [view setHitTestReturn:button]; |
238 EXPECT_FALSE([bar_ hoverButtonForEvent:event]); | 238 EXPECT_FALSE([bar_ hoverButtonForEvent:event]); |
239 | 239 |
240 // Now! | 240 // Now! |
241 scoped_nsobject<GradientButtonCell> cell([[GradientButtonCell alloc] init]); | 241 scoped_nsobject<GradientButtonCell> cell([[GradientButtonCell alloc] init]); |
242 [button setCell:cell.get()]; | 242 [button setCell:cell.get()]; |
243 EXPECT_TRUE([bar_ hoverButtonForEvent:nil]); | 243 EXPECT_TRUE([bar_ hoverButtonForEvent:nil]); |
244 } | 244 } |
245 | 245 |
246 } // namespace | 246 } // namespace |
OLD | NEW |