| Index: chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm
|
| diff --git a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm
|
| index 7fd08e3150e049af13efca031769f128b4550f4c..650004ec298e3a9cc7f7af9a2855246464d4217c 100644
|
| --- a/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/bookmarks/bookmark_button_cell_unittest.mm
|
| @@ -152,4 +152,29 @@ TEST_F(BookmarkButtonCellTest, Awake) {
|
| EXPECT_EQ(NSLeftTextAlignment, [cell alignment]);
|
| }
|
|
|
| +// Subfolder arrow details.
|
| +TEST_F(BookmarkButtonCellTest, FolderArrow) {
|
| + BookmarkModel* model = profile()->GetBookmarkModel();
|
| + const BookmarkNode* bar = model->bookmark_bar_node();
|
| + const BookmarkNode* node = model->AddURL(bar, bar->child_count(),
|
| + ASCIIToUTF16("title"),
|
| + GURL("http://www.google.com"));
|
| + scoped_nsobject<BookmarkButtonCell> cell(
|
| + [[BookmarkButtonCell alloc] initForNode:node
|
| + contextMenu:nil
|
| + cellText:@"small"
|
| + cellImage:nil]);
|
| + EXPECT_TRUE(cell.get());
|
| +
|
| + NSSize size = [cell cellSize];
|
| + // sanity check
|
| + EXPECT_GE(size.width, 2);
|
| + EXPECT_GE(size.height, 2);
|
| +
|
| + // Once we turn on arrow drawing make sure there is now room for it.
|
| + [cell setDrawFolderArrow:YES];
|
| + NSSize arrowSize = [cell cellSize];
|
| + EXPECT_GT(arrowSize.width, size.width);
|
| +}
|
| +
|
| } // namespace
|
|
|