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

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

Issue 2729603008: [Mac] Remove bookmark bar NIB (Closed)
Patch Set: CL comments Created 3 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_bar_view_cocoa_unittest.mm
diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa_unittest.mm
index c447200ce8e6f8c775f83a48c20cc13a209789da..2694ed05c24968f136eb690872ec7e510b811a22 100644
--- a/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa_unittest.mm
+++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa_unittest.mm
@@ -35,7 +35,7 @@ const NSPoint kPoint = {10, 10};
} // namespace
// Fake DraggingInfo, fake BookmarkBarController, fake NSPasteboard...
-@interface FakeBookmarkDraggingInfo : NSObject {
+@interface FakeBookmarkDraggingInfo : BookmarkBarController {
@public
BOOL dragButtonToPong_;
BOOL dragButtonToShouldCopy_;
@@ -46,14 +46,14 @@ const NSPoint kPoint = {10, 10};
// Only mock one type of drag data at a time.
NSString* dragDataType_;
BookmarkButton* button_; // weak
- BookmarkModel* bookmarkModel_; // weak
+ BookmarkModel* stubbedBookmarkModel_; // weak
id draggingSource_;
}
@property (nonatomic) BOOL dropIndicatorShown;
@property (nonatomic) BOOL draggingEnteredCalled;
@property (nonatomic, copy) NSString* dragDataType;
@property (nonatomic, assign) BookmarkButton* button;
-@property (nonatomic, assign) BookmarkModel* bookmarkModel;
+
@end
@implementation FakeBookmarkDraggingInfo
@@ -62,7 +62,6 @@ const NSPoint kPoint = {10, 10};
@synthesize draggingEnteredCalled = draggingEnteredCalled_;
@synthesize dragDataType = dragDataType_;
@synthesize button = button_;
-@synthesize bookmarkModel = bookmarkModel_;
- (id)init {
if ((self = [super init])) {
@@ -131,6 +130,18 @@ const NSPoint kPoint = {10, 10};
// Fake a controller for callback ponging
+- (void)viewDidLoad {
+ // no-op
+}
+
+- (void)setBookmarkModel:(BookmarkModel*)model {
+ stubbedBookmarkModel_ = model;
+}
+
+- (BookmarkModel*)bookmarkModel {
+ return stubbedBookmarkModel_;
+}
+
- (BOOL)dragButton:(BookmarkButton*)button to:(NSPoint)point copy:(BOOL)copy {
dragButtonToPong_ = YES;
dragButtonToShouldCopy_ = copy;
« no previous file with comments | « chrome/browser/ui/cocoa/bookmarks/bookmark_bar_view_cocoa.mm ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698