Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm |
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm |
index 758835ac57718f868e983fffbc9e5e4b3c4f54a3..a807effddb44453747fd905d6aee0436a8cc192f 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bubble_controller_unittest.mm |
@@ -31,41 +31,6 @@ using bookmarks::BookmarkModel; |
using bookmarks::BookmarkNode; |
using content::WebContents; |
-// Watch for bookmark pulse notifications so we can confirm they were sent. |
-@interface BookmarkPulseObserver : NSObject { |
- int notifications_; |
-} |
-@property (assign, nonatomic) int notifications; |
-@end |
- |
- |
-@implementation BookmarkPulseObserver |
- |
-@synthesize notifications = notifications_; |
- |
-- (id)init { |
- if ((self = [super init])) { |
- [[NSNotificationCenter defaultCenter] |
- addObserver:self |
- selector:@selector(pulseBookmarkNotification:) |
- name:bookmark_button::kPulseBookmarkButtonNotification |
- object:nil]; |
- } |
- return self; |
-} |
- |
-- (void)pulseBookmarkNotification:(NSNotificationCenter *)notification { |
- notifications_++; |
-} |
- |
-- (void)dealloc { |
- [[NSNotificationCenter defaultCenter] removeObserver:self]; |
- [super dealloc]; |
-} |
- |
-@end |
- |
- |
namespace { |
// URL of the test bookmark. |
@@ -242,7 +207,6 @@ TEST_F(BookmarkBubbleControllerTest, TestFolderWithBlankName) { |
EXPECT_TRUE(blankFolderFound); |
} |
- |
// Click on edit; bubble gets closed. |
TEST_F(BookmarkBubbleControllerTest, TestEdit) { |
const BookmarkNode* node = CreateTestBookmark(); |
@@ -262,17 +226,14 @@ TEST_F(BookmarkBubbleControllerTest, TestClose) { |
const BookmarkNode* node = CreateTestBookmark(); |
EXPECT_EQ(edits_, 0); |
- base::scoped_nsobject<BookmarkPulseObserver> observer( |
- [[BookmarkPulseObserver alloc] init]); |
- EXPECT_EQ([observer notifications], 0); |
BookmarkBubbleController* controller = ControllerForNode(node); |
+ EXPECT_EQ(node, controller.pulsingBookmarkNode); |
EXPECT_TRUE(controller); |
EXPECT_FALSE(IsWindowClosing()); |
- EXPECT_EQ([observer notifications], 1); |
[controller ok:controller]; |
EXPECT_EQ(edits_, 0); |
EXPECT_TRUE(IsWindowClosing()); |
- EXPECT_EQ([observer notifications], 2); |
+ EXPECT_EQ(nullptr, controller.pulsingBookmarkNode); |
} |
// User changes title and parent folder in the UI |