OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #import "chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h" | 5 #import "chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.h" |
6 | 6 |
7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" | 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 #include "testing/platform_test.h" | 10 #include "testing/platform_test.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 NSRectFill(NSMakeRect(0, 0, 16, 16)); | 26 NSRectFill(NSMakeRect(0, 0, 16, 16)); |
27 [projectorImage unlockFocus]; | 27 [projectorImage unlockFocus]; |
28 | 28 |
29 scoped_nsobject<NSImage> throbImage( | 29 scoped_nsobject<NSImage> throbImage( |
30 [[NSImage alloc] initWithSize:NSMakeSize(32, 32)]); | 30 [[NSImage alloc] initWithSize:NSMakeSize(32, 32)]); |
31 [throbImage lockFocus]; | 31 [throbImage lockFocus]; |
32 NSRectFill(NSMakeRect(0, 0, 32, 32)); | 32 NSRectFill(NSMakeRect(0, 0, 32, 32)); |
33 [throbImage unlockFocus]; | 33 [throbImage unlockFocus]; |
34 | 34 |
35 scoped_nsobject<TabProjectingImageView> view([[TabProjectingImageView alloc] | 35 scoped_nsobject<TabProjectingImageView> view([[TabProjectingImageView alloc] |
36 initWithFrame:NSMakeRect(0, 0, 32, 32) | 36 initWithFrame:NSMakeRect(0, 0, 32, 32) |
37 backgroundImage:backgroundImage | 37 backgroundImage:backgroundImage |
38 projectorImage:projectorImage | 38 projectorImage:projectorImage |
39 throbImage:throbImage | 39 throbImage:throbImage |
40 durationMS:20]); | 40 durationMS:20 |
| 41 animationContainer:NULL]); |
41 view_ = view.get(); | 42 view_ = view.get(); |
42 [[test_window() contentView] addSubview:view_]; | 43 [[test_window() contentView] addSubview:view_]; |
43 } | 44 } |
44 | 45 |
45 MessageLoopForUI message_loop_; // Needed for ui::ThrobAnimation. | 46 MessageLoopForUI message_loop_; // Needed for ui::ThrobAnimation. |
46 TabProjectingImageView* view_; | 47 TabProjectingImageView* view_; |
47 }; | 48 }; |
48 | 49 |
49 TEST_VIEW(TabProjectingImageViewTest, view_) | 50 TEST_VIEW(TabProjectingImageViewTest, view_) |
50 | 51 |
51 } // namespace | 52 } // namespace |
OLD | NEW |