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

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

Issue 402066: Moved a whole pile of unittests over to CocoaTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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_button_cell_unittest.mm
===================================================================
--- chrome/browser/cocoa/bookmark_button_cell_unittest.mm (revision 32421)
+++ chrome/browser/cocoa/bookmark_button_cell_unittest.mm (working copy)
@@ -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 @@
// 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]);
}
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_view_unittest.mm ('k') | chrome/browser/cocoa/bookmark_name_folder_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698