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

Side by Side Diff: chrome/browser/ui/cocoa/extensions/browser_action_test_util_mac.mm

Issue 1971463002: Get rid of some lingering MD-specific raster assets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: msw review Created 4 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
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 #include "chrome/browser/extensions/browser_action_test_util.h" 5 #include "chrome/browser/extensions/browser_action_test_util.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 BrowserActionTestUtil::~BrowserActionTestUtil() {} 114 BrowserActionTestUtil::~BrowserActionTestUtil() {}
115 115
116 int BrowserActionTestUtil::NumberOfBrowserActions() { 116 int BrowserActionTestUtil::NumberOfBrowserActions() {
117 return [GetController(browser_, test_helper_.get()) buttonCount]; 117 return [GetController(browser_, test_helper_.get()) buttonCount];
118 } 118 }
119 119
120 int BrowserActionTestUtil::VisibleBrowserActions() { 120 int BrowserActionTestUtil::VisibleBrowserActions() {
121 return [GetController(browser_, test_helper_.get()) visibleButtonCount]; 121 return [GetController(browser_, test_helper_.get()) visibleButtonCount];
122 } 122 }
123 123
124 bool BrowserActionTestUtil::IsChevronShowing() {
125 BrowserActionsController* controller =
126 GetController(browser_, test_helper_.get());
127 // The magic "18" comes from kChevronWidth in browser_actions_controller.mm.
128 return ![controller chevronIsHidden] &&
129 NSWidth([[controller containerView] animationEndFrame]) >= 18;
130 }
131
132 void BrowserActionTestUtil::InspectPopup(int index) { 124 void BrowserActionTestUtil::InspectPopup(int index) {
133 NOTREACHED(); 125 NOTREACHED();
134 } 126 }
135 127
136 bool BrowserActionTestUtil::HasIcon(int index) { 128 bool BrowserActionTestUtil::HasIcon(int index) {
137 return [GetButton(browser_, test_helper_.get(), index) image] != nil; 129 return [GetButton(browser_, test_helper_.get(), index) image] != nil;
138 } 130 }
139 131
140 gfx::Image BrowserActionTestUtil::GetIcon(int index) { 132 gfx::Image BrowserActionTestUtil::GetIcon(int index) {
141 NSImage* ns_image = [GetButton(browser_, test_helper_.get(), index) image]; 133 NSImage* ns_image = [GetButton(browser_, test_helper_.get(), index) image];
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { 206 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() {
215 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize])); 207 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize]));
216 } 208 }
217 209
218 BrowserActionTestUtil::BrowserActionTestUtil(Browser* browser, 210 BrowserActionTestUtil::BrowserActionTestUtil(Browser* browser,
219 BrowserActionTestUtil* main_bar) 211 BrowserActionTestUtil* main_bar)
220 : browser_(browser), 212 : browser_(browser),
221 test_helper_(new TestToolbarActionsBarHelperCocoa( 213 test_helper_(new TestToolbarActionsBarHelperCocoa(
222 browser_, GetController(browser_, main_bar->test_helper_.get()))) { 214 browser_, GetController(browser_, main_bar->test_helper_.get()))) {
223 } 215 }
OLDNEW
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/extensions/extension_action_view_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698