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

Unified Diff: chrome/browser/cocoa/throbber_view_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
« no previous file with comments | « chrome/browser/cocoa/tab_view_unittest.mm ('k') | chrome/browser/cocoa/toolbar_controller_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/throbber_view_unittest.mm
===================================================================
--- chrome/browser/cocoa/throbber_view_unittest.mm (revision 32421)
+++ chrome/browser/cocoa/throbber_view_unittest.mm (working copy)
@@ -14,32 +14,19 @@
namespace {
-class ThrobberViewTest : public PlatformTest {
+class ThrobberViewTest : public CocoaTest {
public:
ThrobberViewTest() {
NSRect frame = NSMakeRect(10, 10, 16, 16);
NSImage* image =
ResourceBundle::GetSharedInstance().GetNSImageNamed(IDR_THROBBER);
- view_.reset([[ThrobberView filmstripThrobberViewWithFrame:frame
- image:image] retain]);
- [cocoa_helper_.contentView() addSubview:view_.get()];
+ view_ = [ThrobberView filmstripThrobberViewWithFrame:frame image:image];
+ [[test_window() contentView] addSubview:view_];
}
- scoped_nsobject<ThrobberView> view_;
- CocoaTestHelper cocoa_helper_; // Inits Cocoa, creates window, etc...
+ ThrobberView* view_;
};
-// Test adding/removing from the view hierarchy, mostly to ensure nothing
-// leaks or crashes.
-TEST_F(ThrobberViewTest, AddRemove) {
- EXPECT_EQ(cocoa_helper_.contentView(), [view_ superview]);
- [view_.get() removeFromSuperview];
- EXPECT_FALSE([view_ superview]);
-}
+TEST_VIEW(ThrobberViewTest, view_)
-// Test drawing, mostly to ensure nothing leaks or crashes.
-TEST_F(ThrobberViewTest, Display) {
- [view_ display];
-}
-
} // namespace
« no previous file with comments | « chrome/browser/cocoa/tab_view_unittest.mm ('k') | chrome/browser/cocoa/toolbar_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698