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

Side by Side Diff: chrome/browser/ui/cocoa/tabs/tab_projecting_image_view_unittest.mm

Issue 13867007: Tab audio indicator: Use animation container on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tabs/tab_projecting_image_view.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_strip_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698