diff options
author | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 00:28:35 +0000 |
---|---|---|
committer | erg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 00:28:35 +0000 |
commit | 20ede07176ece47e95efa8f355ee68a61166b68c (patch) | |
tree | 87b994d26fba0129ab5c28998f7ba9e99c04c735 /chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm | |
parent | 48285173b623d950ecb04be6fd120f464c447e61 (diff) | |
download | chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.zip chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.tar.gz chromium_src-20ede07176ece47e95efa8f355ee68a61166b68c.tar.bz2 |
Mac: Implements the special bookmark bar on NTP.
Based mostly on Ben's patch, but made it compile, work, and descoped
moving the bookmark bar around the view heiarchy.
XIB modification: The root view is now a BookmarkBarToolbarView instead of an NSView and is [BookmarkBarController view].
BUG=17625
Review URL: http://codereview.chromium.org/246034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28074 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm')
-rw-r--r-- | chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm b/chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm index 38a872d..627775a 100644 --- a/chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm +++ b/chrome/browser/cocoa/bookmark_bar_bridge_unittest.mm @@ -33,9 +33,10 @@ typedef std::pair<GURL,WindowOpenDisposition> OpenInfo; @implementation FakeBookmarkBarController -- (id)initWithProfile:(Profile*)profile { - if ((self = [super initWithProfile:profile +- (id)initWithBrowser:(Browser*)browser { + if ((self = [super initWithBrowser:browser initialWidth:100 // arbitrary + compressDelegate:nil resizeDelegate:nil urlDelegate:self])) { callbacks_.reset([[NSMutableArray alloc] init]); @@ -99,8 +100,9 @@ class BookmarkBarBridgeTest : public PlatformTest { // Call all the callbacks; make sure they are all redirected to the objc object. TEST_F(BookmarkBarBridgeTest, TestRedirect) { - Profile *profile = browser_test_helper_.profile(); - BookmarkModel *model = profile->GetBookmarkModel(); + Browser* browser = browser_test_helper_.browser(); + Profile* profile = browser_test_helper_.profile(); + BookmarkModel* model = profile->GetBookmarkModel(); scoped_nsobject<NSView> parentView([[NSView alloc] initWithFrame:NSMakeRect(0,0,100,100)]); @@ -110,7 +112,7 @@ TEST_F(BookmarkBarBridgeTest, TestRedirect) { [[NSView alloc] initWithFrame:NSMakeRect(0,0,100,100)]); scoped_nsobject<FakeBookmarkBarController> - controller([[FakeBookmarkBarController alloc] initWithProfile:profile]); + controller([[FakeBookmarkBarController alloc] initWithBrowser:browser]); EXPECT_TRUE(controller.get()); scoped_ptr<BookmarkBarBridge> bridge(new BookmarkBarBridge(controller.get(), model)); |