| Index: chrome/browser/cocoa/bookmark_button_cell_unittest.mm
|
| ===================================================================
|
| --- chrome/browser/cocoa/bookmark_button_cell_unittest.mm (revision 45152)
|
| +++ chrome/browser/cocoa/bookmark_button_cell_unittest.mm (working copy)
|
| @@ -121,4 +121,28 @@
|
| EXPECT_EQ(NSLeftTextAlignment, [cell alignment]);
|
| }
|
|
|
| +// Subfolder arrow details.
|
| +TEST_F(BookmarkButtonCellTest, FolderArrow) {
|
| + BookmarkModel* model = helper_.profile()->GetBookmarkModel();
|
| + const BookmarkNode* bar = model->GetBookmarkBarNode();
|
| + const BookmarkNode* node = model->AddURL(bar, bar->GetChildCount(), L"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
|
|
|