| 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 28f0fcce6d4a91bca36c955468dfaa5116f63ff2..3a45559d7522d1f1992fb122b3b59c9728768137 100644
|
| --- a/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
|
| +++ b/chrome/browser/ui/cocoa/background_gradient_view_unittest.mm
|
| @@ -10,19 +10,32 @@
|
| #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<BackgroundGradientView> view(
|
| - [[BackgroundGradientView alloc] initWithFrame:frame]);
|
| + base::scoped_nsobject<BackgroundGradientSubClassTest> view(
|
| + [[BackgroundGradientSubClassTest alloc] initWithFrame:frame]);
|
| view_ = view.get();
|
| [[test_window() contentView] addSubview:view_];
|
| }
|
|
|
| - BackgroundGradientView* view_;
|
| + BackgroundGradientSubClassTest* view_;
|
| };
|
|
|
| TEST_VIEW(BackgroundGradientViewTest, view_)
|
|
|