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

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

Issue 2126103003: Change chrome:// favicons in tabstrip based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2785
Patch Set: Created 4 years, 5 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
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 #include <stddef.h> 6 #include <stddef.h>
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/mac_util.h" 10 #include "base/mac/mac_util.h"
(...skipping 24 matching lines...) Expand all
35 #include "components/syncable_prefs/testing_pref_service_syncable.h" 35 #include "components/syncable_prefs/testing_pref_service_syncable.h"
36 #include "testing/gtest/include/gtest/gtest.h" 36 #include "testing/gtest/include/gtest/gtest.h"
37 #import "testing/gtest_mac.h" 37 #import "testing/gtest_mac.h"
38 #include "testing/platform_test.h" 38 #include "testing/platform_test.h"
39 #import "third_party/ocmock/OCMock/OCMock.h" 39 #import "third_party/ocmock/OCMock/OCMock.h"
40 #include "third_party/ocmock/gtest_support.h" 40 #include "third_party/ocmock/gtest_support.h"
41 #include "ui/base/cocoa/animation_utils.h" 41 #include "ui/base/cocoa/animation_utils.h"
42 #include "ui/base/material_design/material_design_controller.h" 42 #include "ui/base/material_design/material_design_controller.h"
43 #include "ui/base/theme_provider.h" 43 #include "ui/base/theme_provider.h"
44 #include "ui/events/test/cocoa_test_event_utils.h" 44 #include "ui/events/test/cocoa_test_event_utils.h"
45 #include "ui/gfx/color_utils.h"
45 #include "ui/gfx/image/image_skia.h" 46 #include "ui/gfx/image/image_skia.h"
46 47
47 using base::ASCIIToUTF16; 48 using base::ASCIIToUTF16;
48 using bookmarks::BookmarkModel; 49 using bookmarks::BookmarkModel;
49 using bookmarks::BookmarkNode; 50 using bookmarks::BookmarkNode;
50 51
51 // Unit tests don't need time-consuming asynchronous animations. 52 // Unit tests don't need time-consuming asynchronous animations.
52 @interface BookmarkBarControllerTestable : BookmarkBarController { 53 @interface BookmarkBarControllerTestable : BookmarkBarController {
53 } 54 }
54 55
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 215
215 216
216 class FakeTheme : public ui::ThemeProvider { 217 class FakeTheme : public ui::ThemeProvider {
217 public: 218 public:
218 FakeTheme(NSColor* color) : color_(color) {} 219 FakeTheme(NSColor* color) : color_(color) {}
219 base::scoped_nsobject<NSColor> color_; 220 base::scoped_nsobject<NSColor> color_;
220 221
221 bool UsingSystemTheme() const override { return true; } 222 bool UsingSystemTheme() const override { return true; }
222 gfx::ImageSkia* GetImageSkiaNamed(int id) const override { return NULL; } 223 gfx::ImageSkia* GetImageSkiaNamed(int id) const override { return NULL; }
223 SkColor GetColor(int id) const override { return SkColor(); } 224 SkColor GetColor(int id) const override { return SkColor(); }
225 color_utils::HSL GetTint(int id) const override { return color_utils::HSL(); }
224 int GetDisplayProperty(int id) const override { return -1; } 226 int GetDisplayProperty(int id) const override { return -1; }
225 bool ShouldUseNativeFrame() const override { return false; } 227 bool ShouldUseNativeFrame() const override { return false; }
226 bool HasCustomImage(int id) const override { return false; } 228 bool HasCustomImage(int id) const override { return false; }
227 base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor) 229 base::RefCountedMemory* GetRawData(int id, ui::ScaleFactor scale_factor)
228 const override { 230 const override {
229 return NULL; 231 return NULL;
230 } 232 }
231 bool InIncognitoMode() const override { return false; } 233 bool InIncognitoMode() const override { return false; }
232 bool HasCustomColor(int id) const override { return false; } 234 bool HasCustomColor(int id) const override { return false; }
233 NSImage* GetNSImageNamed(int id) const override { return nil; } 235 NSImage* GetNSImageNamed(int id) const override { return nil; }
(...skipping 1968 matching lines...) Expand 10 before | Expand all | Expand 10 after
2202 "2f3b ] 4b "); 2204 "2f3b ] 4b ");
2203 actual = bookmarks::test::ModelStringFromNode(root); 2205 actual = bookmarks::test::ModelStringFromNode(root);
2204 EXPECT_EQ(expected, actual); 2206 EXPECT_EQ(expected, actual);
2205 2207
2206 // Verify that the other bookmark folder can't be deleted. 2208 // Verify that the other bookmark folder can't be deleted.
2207 BookmarkButton *otherButton = [bar_ otherBookmarksButton]; 2209 BookmarkButton *otherButton = [bar_ otherBookmarksButton];
2208 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]); 2210 EXPECT_FALSE([bar_ canDragBookmarkButtonToTrash:otherButton]);
2209 } 2211 }
2210 2212
2211 } // namespace 2213 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_service.cc ('k') | chrome/browser/ui/cocoa/download/background_theme.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698