Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2781)

Unified Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm

Issue 1302243002: [Mac] Remove kPulseBookmarkButtonNotification. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarkeditor
Patch Set: Fix test. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {

Powered by Google App Engine
This is Rietveld 408576698