OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import <Cocoa/Cocoa.h> | 5 #import <Cocoa/Cocoa.h> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/scoped_nsobject.h" | 8 #include "base/scoped_nsobject.h" |
9 #import "chrome/browser/cocoa/bookmark_bar_constants.h" // namespace bookmarks | 9 #import "chrome/browser/cocoa/bookmark_bar_constants.h" // namespace bookmarks |
10 #import "chrome/browser/cocoa/bookmark_bar_controller.h" | 10 #import "chrome/browser/cocoa/bookmark_bar_controller.h" |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 - (void)childFolderWillClose:(id<BookmarkButtonControllerProtocol>)child { | 114 - (void)childFolderWillClose:(id<BookmarkButtonControllerProtocol>)child { |
115 [childFolderDelegate_ childFolderWillClose:child]; | 115 [childFolderDelegate_ childFolderWillClose:child]; |
116 } | 116 } |
117 | 117 |
118 @end | 118 @end |
119 | 119 |
120 | 120 |
121 class BookmarkBarFolderControllerTest : public CocoaTest { | 121 class BookmarkBarFolderControllerTest : public CocoaTest { |
122 public: | 122 public: |
123 BrowserTestHelper helper_; | 123 BrowserTestHelper helper_; |
124 scoped_nsobject<BookmarkBarController> bar_; | 124 scoped_nsobject<BookmarkBarControllerChildFolderRedirect> bar_; |
125 const BookmarkNode* folderA_; // owned by model | 125 const BookmarkNode* folderA_; // owned by model |
126 const BookmarkNode* longTitleNode_; // owned by model | 126 const BookmarkNode* longTitleNode_; // owned by model |
127 | 127 |
128 BookmarkBarFolderControllerTest() { | 128 BookmarkBarFolderControllerTest() { |
129 BookmarkModel* model = helper_.profile()->GetBookmarkModel(); | 129 BookmarkModel* model = helper_.profile()->GetBookmarkModel(); |
130 const BookmarkNode* parent = model->GetBookmarkBarNode(); | 130 const BookmarkNode* parent = model->GetBookmarkBarNode(); |
131 const BookmarkNode* folderA = model->AddGroup(parent, | 131 const BookmarkNode* folderA = model->AddGroup(parent, |
132 parent->GetChildCount(), | 132 parent->GetChildCount(), |
133 L"group"); | 133 L"group"); |
134 folderA_ = folderA; | 134 folderA_ = folderA; |
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1445 [folder deleteBookmark:folder]; | 1445 [folder deleteBookmark:folder]; |
1446 EXPECT_FALSE([folder folderController]); | 1446 EXPECT_FALSE([folder folderController]); |
1447 } | 1447 } |
1448 | 1448 |
1449 // TODO(jrg): draggingEntered: and draggingExited: trigger timers so | 1449 // TODO(jrg): draggingEntered: and draggingExited: trigger timers so |
1450 // they are hard to test. Factor out "fire timers" into routines | 1450 // they are hard to test. Factor out "fire timers" into routines |
1451 // which can be overridden to fire immediately to make behavior | 1451 // which can be overridden to fire immediately to make behavior |
1452 // confirmable. | 1452 // confirmable. |
1453 // There is a similar problem with mouseEnteredButton: and | 1453 // There is a similar problem with mouseEnteredButton: and |
1454 // mouseExitedButton:. | 1454 // mouseExitedButton:. |
OLD | NEW |