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

Unified Diff: chrome/browser/ui/cocoa/background_gradient_view_unittest.mm

Issue 2336453002: BackgroundGradientView: -drawBackground: → -drawRect: (Closed)
Patch Set: Created 4 years, 3 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/ui/cocoa/background_gradient_view_unittest.mm
diff --git a/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm b/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
index 3a45559d7522d1f1992fb122b3b59c9728768137..28f0fcce6d4a91bca36c955468dfaa5116f63ff2 100644
--- a/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
+++ b/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
@@ -10,32 +10,19 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
-// Since BackgroundGradientView doesn't do any drawing by default, we
-// create a subclass to call its draw method for us.
-@interface BackgroundGradientSubClassTest : BackgroundGradientView
-@end
-
-@implementation BackgroundGradientSubClassTest
-
-- (void)drawRect:(NSRect)dirtyRect {
- [self drawBackground:dirtyRect];
-}
-
-@end
-
namespace {
class BackgroundGradientViewTest : public CocoaTest {
public:
BackgroundGradientViewTest() {
NSRect frame = NSMakeRect(0, 0, 100, 30);
- base::scoped_nsobject<BackgroundGradientSubClassTest> view(
- [[BackgroundGradientSubClassTest alloc] initWithFrame:frame]);
+ base::scoped_nsobject<BackgroundGradientView> view(
+ [[BackgroundGradientView alloc] initWithFrame:frame]);
view_ = view.get();
[[test_window() contentView] addSubview:view_];
}
- BackgroundGradientSubClassTest* view_;
+ BackgroundGradientView* view_;
};
TEST_VIEW(BackgroundGradientViewTest, view_)

Powered by Google App Engine
This is Rietveld 408576698