diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 21:52:16 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-19 21:52:16 +0000 |
commit | d4e186524ef4db7f227c57dd61ef727c5eaac623 (patch) | |
tree | 7bf4bc7a25f60c3de9f03f917907fdb151735a81 /chrome/browser/cocoa/bookmark_button_cell_unittest.mm | |
parent | 2d9c6094d497fac4714ff79205de870c3b6ccaa1 (diff) | |
download | chromium_src-d4e186524ef4db7f227c57dd61ef727c5eaac623.zip chromium_src-d4e186524ef4db7f227c57dd61ef727c5eaac623.tar.gz chromium_src-d4e186524ef4db7f227c57dd61ef727c5eaac623.tar.bz2 |
Moved a whole pile of unittests over to CocoaTest.
AboutIPC.xib - Connected up controller to its window and the window delegate to the controller.
BUG=26484, 26484
TEST=See repro steps in bugs.
Review URL: http://codereview.chromium.org/402066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32551 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/bookmark_button_cell_unittest.mm')
-rw-r--r-- | chrome/browser/cocoa/bookmark_button_cell_unittest.mm | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/chrome/browser/cocoa/bookmark_button_cell_unittest.mm b/chrome/browser/cocoa/bookmark_button_cell_unittest.mm index aabe1af..a1b7b40 100644 --- a/chrome/browser/cocoa/bookmark_button_cell_unittest.mm +++ b/chrome/browser/cocoa/bookmark_button_cell_unittest.mm @@ -11,20 +11,17 @@ namespace { -class BookmarkButtonCellTest : public PlatformTest { - public: - CocoaTestHelper cocoa_helper_; // Inits Cocoa, creates window, etc... - scoped_nsobject<NSButton> view_; +class BookmarkButtonCellTest : public CocoaTest { }; // Make sure it's not totally bogus TEST_F(BookmarkButtonCellTest, SizeForBounds) { NSRect frame = NSMakeRect(0, 0, 50, 30); - view_.reset([[NSButton alloc] initWithFrame:frame]); - scoped_nsobject<BookmarkButtonCell> cell([[BookmarkButtonCell alloc] - initTextCell:@"Testing"]); - [view_ setCell:cell.get()]; - [cocoa_helper_.contentView() addSubview:view_.get()]; + scoped_nsobject<NSButton> view([[NSButton alloc] initWithFrame:frame]); + scoped_nsobject<BookmarkButtonCell> cell( + [[BookmarkButtonCell alloc] initTextCell:@"Testing"]); + [view setCell:cell.get()]; + [[test_window() contentView] addSubview:view]; NSRect r = NSMakeRect(0, 0, 100, 100); NSSize size = [cell.get() cellSizeForBounds:r]; @@ -34,8 +31,8 @@ TEST_F(BookmarkButtonCellTest, SizeForBounds) { // Make sure the default from the base class is overridden TEST_F(BookmarkButtonCellTest, MouseEnterStuff) { - scoped_nsobject<BookmarkButtonCell> cell([[BookmarkButtonCell alloc] - initTextCell:@"Testing"]); + scoped_nsobject<BookmarkButtonCell> cell( + [[BookmarkButtonCell alloc] initTextCell:@"Testing"]); EXPECT_TRUE([cell.get() showsBorderOnlyWhileMouseInside]); } |