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

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

Issue 2876002: Mac/clang: First pass over unit_tests (Closed)
Patch Set: '' Created 10 years, 6 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
Index: chrome/browser/cocoa/bookmark_bar_controller_unittest.mm
diff --git a/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm b/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm
index 616753e4be88badd8161afea786c201823d9efb8..82dfe0dee574f6df809d0e69510169c9ee16a1b0 100644
--- a/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm
+++ b/chrome/browser/cocoa/bookmark_bar_controller_unittest.mm
@@ -252,19 +252,12 @@ class BookmarkBarControllerTestBase : public CocoaTest {
BrowserTestHelper helper_;
scoped_nsobject<NSView> parent_view_;
scoped_nsobject<ViewResizerPong> resizeDelegate_;
- scoped_nsobject<BookmarkBarController> bar_;
BookmarkBarControllerTestBase() {
resizeDelegate_.reset([[ViewResizerPong alloc] init]);
NSRect parent_frame = NSMakeRect(0, 0, 800, 50);
parent_view_.reset([[NSView alloc] initWithFrame:parent_frame]);
[parent_view_ setHidden:YES];
- bar_.reset([[BookmarkBarController alloc]
- initWithBrowser:helper_.browser()
- initialWidth:NSWidth(parent_frame)
- delegate:nil
- resizeDelegate:resizeDelegate_.get()]);
- InstallAndToggleBar(bar_.get());
}
void InstallAndToggleBar(BookmarkBarController* bar) {
@@ -295,6 +288,7 @@ class BookmarkBarControllerTest : public BookmarkBarControllerTestBase {
scoped_nsobject<BookmarkMenu> menu_;
scoped_nsobject<NSMenuItem> menu_item_;
scoped_nsobject<NSButtonCell> cell_;
+ scoped_nsobject<BookmarkBarControllerNoOpen> bar_;
BookmarkBarControllerTest() {
bar_.reset(
@@ -754,9 +748,7 @@ TEST_F(BookmarkBarControllerTest, OpenBookmarkFromMenus) {
WindowOpenDisposition dispositions[] = { NEW_FOREGROUND_TAB,
NEW_WINDOW,
OFF_THE_RECORD };
- for (unsigned int i = 0;
- i < sizeof(dispositions)/sizeof(dispositions[0]);
- i++) {
+ for (unsigned int i = 0; i < arraysize(dispositions); i++) {
GURL gurl(urls[i]);
[bar_ performSelector:selectors[i]
withObject:ItemForBookmarkBarMenu(gurl)];
@@ -1829,6 +1821,8 @@ TEST_F(BookmarkBarControllerNotificationTest, DeregistersForNotifications) {
class BookmarkBarControllerDragDropTest : public BookmarkBarControllerTestBase {
public:
+ scoped_nsobject<BookmarkBarControllerDragData> bar_;
+
BookmarkBarControllerDragDropTest() {
bar_.reset(
[[BookmarkBarControllerDragData alloc]

Powered by Google App Engine
This is Rietveld 408576698