Index: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm |
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm |
index c31daf067e42e9166c3a2512284ae79b611ea6b8..040a7b873355c7d86957f7c458276b0f3c6935c6 100644 |
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm |
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm |
@@ -2086,30 +2086,23 @@ TEST_F(BookmarkBarControllerDragDropTest, PulseButton) { |
BookmarkButton* button = [[bar_ buttons] objectAtIndex:0]; |
EXPECT_FALSE([button isContinuousPulsing]); |
- |
- NSValue *value = [NSValue valueWithPointer:node]; |
- NSDictionary *dict = [NSDictionary |
- dictionaryWithObjectsAndKeys:value, |
- bookmark_button::kBookmarkKey, |
- [NSNumber numberWithBool:YES], |
- bookmark_button::kBookmarkPulseFlagKey, |
- nil]; |
- [[NSNotificationCenter defaultCenter] |
- postNotificationName:bookmark_button::kPulseBookmarkButtonNotification |
- object:nil |
- userInfo:dict]; |
+ [bar_ startPulsingBookmarkNode:node]; |
EXPECT_TRUE([button isContinuousPulsing]); |
- |
- dict = [NSDictionary dictionaryWithObjectsAndKeys:value, |
- bookmark_button::kBookmarkKey, |
- [NSNumber numberWithBool:NO], |
- bookmark_button::kBookmarkPulseFlagKey, |
- nil]; |
- [[NSNotificationCenter defaultCenter] |
- postNotificationName:bookmark_button::kPulseBookmarkButtonNotification |
- object:nil |
- userInfo:dict]; |
+ [bar_ stopPulsingBookmarkNode:node]; |
EXPECT_FALSE([button isContinuousPulsing]); |
+ |
+ // Pulsing a node within a folder should pulse the folder button. |
+ const BookmarkNode* folder = |
+ model->AddFolder(root, root->child_count(), ASCIIToUTF16("folder")); |
+ const BookmarkNode* inner = |
+ model->AddURL(folder, folder->child_count(), ASCIIToUTF16("inner"), gurl); |
+ |
+ BookmarkButton* folder_button = [[bar_ buttons] objectAtIndex:1]; |
+ EXPECT_FALSE([folder_button isContinuousPulsing]); |
+ [bar_ startPulsingBookmarkNode:inner]; |
+ EXPECT_TRUE([folder_button isContinuousPulsing]); |
+ [bar_ stopPulsingBookmarkNode:folder]; |
+ EXPECT_FALSE([folder_button isContinuousPulsing]); |
} |
TEST_F(BookmarkBarControllerDragDropTest, DragBookmarkDataToTrash) { |