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

Side by Side Diff: chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller_unittest.mm

Issue 10388064: Add GetImageSkiaNamed to resource_bundle and theme_provider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed nits Created 8 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/scoped_nsobject.h" 9 #include "base/memory/scoped_nsobject.h"
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 15 matching lines...) Expand all
26 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h" 26 #include "chrome/browser/ui/cocoa/cocoa_profile_test.h"
27 #import "chrome/browser/ui/cocoa/view_resizer_pong.h" 27 #import "chrome/browser/ui/cocoa/view_resizer_pong.h"
28 #include "chrome/test/base/model_test_utils.h" 28 #include "chrome/test/base/model_test_utils.h"
29 #include "testing/gtest/include/gtest/gtest.h" 29 #include "testing/gtest/include/gtest/gtest.h"
30 #import "testing/gtest_mac.h" 30 #import "testing/gtest_mac.h"
31 #include "testing/platform_test.h" 31 #include "testing/platform_test.h"
32 #include "third_party/ocmock/gtest_support.h" 32 #include "third_party/ocmock/gtest_support.h"
33 #import "third_party/ocmock/OCMock/OCMock.h" 33 #import "third_party/ocmock/OCMock/OCMock.h"
34 #include "ui/base/test/cocoa_test_event_utils.h" 34 #include "ui/base/test/cocoa_test_event_utils.h"
35 #include "ui/base/theme_provider.h" 35 #include "ui/base/theme_provider.h"
36 #include "ui/gfx/image/image_skia.h"
36 37
37 // Unit tests don't need time-consuming asynchronous animations. 38 // Unit tests don't need time-consuming asynchronous animations.
38 @interface BookmarkBarControllerTestable : BookmarkBarController { 39 @interface BookmarkBarControllerTestable : BookmarkBarController {
39 } 40 }
40 @end 41 @end
41 @implementation BookmarkBarControllerTestable 42 @implementation BookmarkBarControllerTestable
42 - (BOOL)animationEnabled { 43 - (BOOL)animationEnabled {
43 return NO; 44 return NO;
44 } 45 }
45 @end 46 @end
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 183 }
183 184
184 @end 185 @end
185 186
186 187
187 class FakeTheme : public ui::ThemeProvider { 188 class FakeTheme : public ui::ThemeProvider {
188 public: 189 public:
189 FakeTheme(NSColor* color) : color_(color) {} 190 FakeTheme(NSColor* color) : color_(color) {}
190 scoped_nsobject<NSColor> color_; 191 scoped_nsobject<NSColor> color_;
191 192
192 virtual SkBitmap* GetBitmapNamed(int id) const { return nil; } 193 virtual SkBitmap* GetBitmapNamed(int id) const { return NULL; }
194 virtual gfx::ImageSkia* GetImageSkiaNamed(int id) const { return NULL; }
193 virtual SkColor GetColor(int id) const { return SkColor(); } 195 virtual SkColor GetColor(int id) const { return SkColor(); }
194 virtual bool GetDisplayProperty(int id, int* result) const { return false; } 196 virtual bool GetDisplayProperty(int id, int* result) const { return false; }
195 virtual bool ShouldUseNativeFrame() const { return false; } 197 virtual bool ShouldUseNativeFrame() const { return false; }
196 virtual bool HasCustomImage(int id) const { return false; } 198 virtual bool HasCustomImage(int id) const { return false; }
197 virtual base::RefCountedMemory* GetRawData(int id) const { return NULL; } 199 virtual base::RefCountedMemory* GetRawData(int id) const { return NULL; }
198 virtual NSImage* GetNSImageNamed(int id, bool allow_default) const { 200 virtual NSImage* GetNSImageNamed(int id, bool allow_default) const {
199 return nil; 201 return nil;
200 } 202 }
201 virtual NSColor* GetNSImageColorNamed(int id, bool allow_default) const { 203 virtual NSColor* GetNSImageColorNamed(int id, bool allow_default) const {
202 return nil; 204 return nil;
(...skipping 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
2185 "2f3b ] 4b "); 2187 "2f3b ] 4b ");
2186 actual = model_test_utils::ModelStringFromNode(root); 2188 actual = model_test_utils::ModelStringFromNode(root);
2187 EXPECT_EQ(expected, actual); 2189 EXPECT_EQ(expected, actual);
2188 2190
2189 // Verify that the other bookmark folder can't be deleted. 2191 // Verify that the other bookmark folder can't be deleted.
2190 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; 2192 BookmarkButton *otherButton = [bar_ otherBookmarksButton];
2191 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); 2193 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]);
2192 } 2194 }
2193 2195
2194 } // namespace 2196 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/ui/cocoa/bookmarks/bookmark_bar_toolbar_view_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698