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

Unified Diff: chrome/browser/cocoa/bookmark_button_cell_unittest.mm

Issue 1709004: size --> cellSize adjustment (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 8 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
« no previous file with comments | « chrome/browser/cocoa/bookmark_button_cell.mm ('k') | chrome/chrome_dll.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « chrome/browser/cocoa/bookmark_button_cell.mm ('k') | chrome/chrome_dll.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698