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