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

Side by Side Diff: chrome/browser/ui/cocoa/hover_image_button_unittest.mm

Issue 6541031: Integrate gfx::Image into the ResourceBundle. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #include "base/scoped_nsobject.h" 7 #include "base/scoped_nsobject.h"
8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h" 8 #import "chrome/browser/ui/cocoa/cocoa_test_helper.h"
9 #import "chrome/browser/ui/cocoa/hover_image_button.h" 9 #import "chrome/browser/ui/cocoa/hover_image_button.h"
10 #include "grit/theme_resources.h" 10 #include "grit/theme_resources.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "testing/platform_test.h" 12 #include "testing/platform_test.h"
13 #include "ui/base/resource/resource_bundle.h" 13 #include "ui/base/resource/resource_bundle.h"
14 #include "ui/gfx/image.h"
14 15
15 namespace { 16 namespace {
16 17
17 class HoverImageButtonTest : public CocoaTest { 18 class HoverImageButtonTest : public CocoaTest {
18 public: 19 public:
19 HoverImageButtonTest() { 20 HoverImageButtonTest() {
20 NSRect content_frame = [[test_window() contentView] frame]; 21 NSRect content_frame = [[test_window() contentView] frame];
21 scoped_nsobject<HoverImageButton> button( 22 scoped_nsobject<HoverImageButton> button(
22 [[HoverImageButton alloc] initWithFrame:content_frame]); 23 [[HoverImageButton alloc] initWithFrame:content_frame]);
23 button_ = button.get(); 24 button_ = button.get();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 59
59 [button_ mouseEntered:nil]; 60 [button_ mouseEntered:nil];
60 [button_ drawRect:[button_ frame]]; 61 [button_ drawRect:[button_ frame]];
61 EXPECT_EQ([button_ alphaValue], 1.0); 62 EXPECT_EQ([button_ alphaValue], 1.0);
62 [button_ mouseExited:nil]; 63 [button_ mouseExited:nil];
63 [button_ drawRect:[button_ frame]]; 64 [button_ drawRect:[button_ frame]];
64 EXPECT_EQ([button_ alphaValue], 0.5); 65 EXPECT_EQ([button_ alphaValue], 0.5);
65 } 66 }
66 67
67 } // namespace 68 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698