diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-15 19:26:33 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-15 19:26:33 +0000 |
commit | 9a7e86a71073e1026e053d2a8a00f880cb4c3bd8 (patch) | |
tree | 49976fb5356aa419f9f38108e4b7253a1eb0bc70 /chrome/browser/cocoa/bookmark_button_cell_unittest.mm | |
parent | 809d43de928a6a80723d360d68feafabe3c5071e (diff) | |
download | chromium_src-9a7e86a71073e1026e053d2a8a00f880cb4c3bd8.zip chromium_src-9a7e86a71073e1026e053d2a8a00f880cb4c3bd8.tar.gz chromium_src-9a7e86a71073e1026e053d2a8a00f880cb4c3bd8.tar.bz2 |
Fix "open all" on a folder node to open only 'marks in that folder,
not ALL all. Make Delete and Rename enabled for folder context menu
(but disabled for "Other Bookmarks").
nib changes (related to the context menus):
- Telegate is the bookmark bar controller.
- Switched type from NSMenu to BookmarkMenu.
TEST=New window. Create folder "empty" with nothing in it. Create
folder "two" with 2 bookmarks in it. Create a final bookmark in the
top level of the bar.
Context menu (right click) over all folders.
Make sure Delete and Rename enabled for folders but not "Other Bookmarks".
Make sure "Open All" (and friends) disabled over "empty", enabled over "two".
"Open All" on "two" --> see 2 opened.
"Open All" on the bar itself --> see 3 opened.
Ditto for "Open all in new window" and "open all in incognito window".
Create a new window. In new window, make sure folders have context menus.
BUG=http://crbug.com/27522, http://crbug.com/27529
Review URL: http://codereview.chromium.org/391046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32029 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_button_cell_unittest.mm')
-rw-r--r-- | chrome/browser/cocoa/bookmark_button_cell_unittest.mm | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/chrome/browser/cocoa/bookmark_button_cell_unittest.mm b/chrome/browser/cocoa/bookmark_button_cell_unittest.mm index 9cb6ca6..aabe1af 100644 --- a/chrome/browser/cocoa/bookmark_button_cell_unittest.mm +++ b/chrome/browser/cocoa/bookmark_button_cell_unittest.mm @@ -4,6 +4,7 @@ #include "base/scoped_nsobject.h" #import "chrome/browser/cocoa/bookmark_button_cell.h" +#import "chrome/browser/cocoa/bookmark_menu.h" #import "chrome/browser/cocoa/cocoa_test_helper.h" #include "testing/gtest/include/gtest/gtest.h" #include "testing/platform_test.h" @@ -31,21 +32,6 @@ TEST_F(BookmarkButtonCellTest, SizeForBounds) { EXPECT_TRUE(size.width < 200 && size.height < 200); } -// Make sure a cell's menu has the cell itself as the delegate. This -// is our convention for reusing the context menu across all bookmarks -// while being unambiguous when used. -TEST_F(BookmarkButtonCellTest, MenuDelegate) { - scoped_nsobject<BookmarkButtonCell> cell([[BookmarkButtonCell alloc] - initTextCell:@"Testing"]); - EXPECT_FALSE([cell.get() menu]); - - scoped_nsobject<NSMenu> menu([[NSMenu alloc] initWithTitle:@"foo"]); - [cell setMenu:menu.get()]; - EXPECT_TRUE([cell.get() menu]); - EXPECT_EQ([[cell.get() menu] delegate], cell.get()); - [cell setMenu:nil]; -} - // Make sure the default from the base class is overridden TEST_F(BookmarkButtonCellTest, MouseEnterStuff) { scoped_nsobject<BookmarkButtonCell> cell([[BookmarkButtonCell alloc] |