| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/scoped_nsobject.h" | 5 #include "base/scoped_nsobject.h" |
| 6 #include "chrome/browser/bookmarks/bookmark_model.h" |
| 6 #import "chrome/browser/cocoa/bookmark_button.h" | 7 #import "chrome/browser/cocoa/bookmark_button.h" |
| 7 #import "chrome/browser/cocoa/bookmark_button_cell.h" | 8 #import "chrome/browser/cocoa/bookmark_button_cell.h" |
| 8 #import "chrome/browser/cocoa/browser_test_helper.h" | 9 #import "chrome/browser/cocoa/browser_test_helper.h" |
| 9 #import "chrome/browser/cocoa/cocoa_test_helper.h" | 10 #import "chrome/browser/cocoa/cocoa_test_helper.h" |
| 10 #import "chrome/browser/cocoa/test_event_utils.h" | 11 #import "chrome/browser/cocoa/test_event_utils.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 #include "testing/platform_test.h" | 13 #include "testing/platform_test.h" |
| 13 | 14 |
| 14 // Fake BookmarkButton delegate to get a pong on mouse entered/exited | 15 // Fake BookmarkButton delegate to get a pong on mouse entered/exited |
| 15 @interface FakeButtonDelegate : NSObject<BookmarkButtonDelegate> { | 16 @interface FakeButtonDelegate : NSObject<BookmarkButtonDelegate> { |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 EXPECT_EQ(1, delegate.get()->entered_); | 106 EXPECT_EQ(1, delegate.get()->entered_); |
| 106 EXPECT_EQ(0, delegate.get()->exited_); | 107 EXPECT_EQ(0, delegate.get()->exited_); |
| 107 | 108 |
| 108 [button mouseExited:moveEvent]; | 109 [button mouseExited:moveEvent]; |
| 109 [button mouseExited:moveEvent]; | 110 [button mouseExited:moveEvent]; |
| 110 EXPECT_EQ(1, delegate.get()->entered_); | 111 EXPECT_EQ(1, delegate.get()->entered_); |
| 111 EXPECT_EQ(2, delegate.get()->exited_); | 112 EXPECT_EQ(2, delegate.get()->exited_); |
| 112 } | 113 } |
| 113 | 114 |
| 114 } | 115 } |
| OLD | NEW |