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

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

Issue 1853503004: Revert of Update BookmarkBarController to use non-deprecated dragging APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp20_107_bluetooth
Patch Set: Created 4 years, 9 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_button_unittest.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm
index d92f30c61436d5d8bbdf59a27b3c29f75df93186..d7b8f7e4dcbb6cdab3befa0d1381f579fd89f31a 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_unittest.mm
@@ -154,39 +154,27 @@
// Verify that if canDragBookmarkButtonToTrash is NO then the button can't
// be dragged to the trash.
delegate.get()->canDragToTrash_ = NO;
- NSDragOperation operation = [button draggingSession:nil
- sourceOperationMaskForDraggingContext:
- NSDraggingContextOutsideApplication];
+ NSDragOperation operation = [button draggingSourceOperationMaskForLocal:NO];
EXPECT_EQ(0u, operation & NSDragOperationDelete);
- operation = [button draggingSession:nil
- sourceOperationMaskForDraggingContext:NSDraggingContextWithinApplication];
+ operation = [button draggingSourceOperationMaskForLocal:YES];
EXPECT_EQ(0u, operation & NSDragOperationDelete);
// Verify that if canDragBookmarkButtonToTrash is YES then the button can
// be dragged to the trash.
delegate.get()->canDragToTrash_ = YES;
- operation = [button draggingSession:nil
- sourceOperationMaskForDraggingContext:
- NSDraggingContextOutsideApplication];
+ operation = [button draggingSourceOperationMaskForLocal:NO];
EXPECT_EQ(NSDragOperationDelete, operation & NSDragOperationDelete);
- operation = [button draggingSession:nil
- sourceOperationMaskForDraggingContext:NSDraggingContextWithinApplication];
+ operation = [button draggingSourceOperationMaskForLocal:YES];
EXPECT_EQ(NSDragOperationDelete, operation & NSDragOperationDelete);
// Verify that canDragBookmarkButtonToTrash is called when expected.
delegate.get()->canDragToTrash_ = YES;
EXPECT_EQ(0, delegate.get()->didDragToTrashCount_);
- [button draggingSession:nil
- endedAtPoint:NSZeroPoint
- operation:NSDragOperationCopy];
+ [button draggedImage:nil endedAt:NSZeroPoint operation:NSDragOperationCopy];
EXPECT_EQ(0, delegate.get()->didDragToTrashCount_);
- [button draggingSession:nil
- endedAtPoint:NSZeroPoint
- operation:NSDragOperationMove];
+ [button draggedImage:nil endedAt:NSZeroPoint operation:NSDragOperationMove];
EXPECT_EQ(0, delegate.get()->didDragToTrashCount_);
- [button draggingSession:nil
- endedAtPoint:NSZeroPoint
- operation:NSDragOperationDelete];
+ [button draggedImage:nil endedAt:NSZeroPoint operation:NSDragOperationDelete];
EXPECT_EQ(1, delegate.get()->didDragToTrashCount_);
}
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_button.mm ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_folder_target.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698