OLD | NEW |
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 "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.h" |
8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "chrome/browser/ui/browser.h" | 9 #include "chrome/browser/ui/browser.h" |
10 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 10 #import "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 } // namespace | 34 } // namespace |
35 | 35 |
36 int BrowserActionTestUtil::NumberOfBrowserActions() { | 36 int BrowserActionTestUtil::NumberOfBrowserActions() { |
37 return [GetController(browser_) buttonCount]; | 37 return [GetController(browser_) buttonCount]; |
38 } | 38 } |
39 | 39 |
40 int BrowserActionTestUtil::VisibleBrowserActions() { | 40 int BrowserActionTestUtil::VisibleBrowserActions() { |
41 return [GetController(browser_) visibleButtonCount]; | 41 return [GetController(browser_) visibleButtonCount]; |
42 } | 42 } |
43 | 43 |
44 ExtensionAction* BrowserActionTestUtil::GetExtensionAction(int index) { | |
45 NOTREACHED(); | |
46 return NULL; | |
47 } | |
48 | |
49 void BrowserActionTestUtil::InspectPopup(int index) { | 44 void BrowserActionTestUtil::InspectPopup(int index) { |
50 NOTREACHED(); | 45 NOTREACHED(); |
51 } | 46 } |
52 | 47 |
53 bool BrowserActionTestUtil::HasIcon(int index) { | 48 bool BrowserActionTestUtil::HasIcon(int index) { |
54 return [GetButton(browser_, index) image] != nil; | 49 return [GetButton(browser_, index) image] != nil; |
55 } | 50 } |
56 | 51 |
57 gfx::Image BrowserActionTestUtil::GetIcon(int index) { | 52 gfx::Image BrowserActionTestUtil::GetIcon(int index) { |
58 NSImage* ns_image = [GetButton(browser_, index) image]; | 53 NSImage* ns_image = [GetButton(browser_, index) image]; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 104 |
110 // static | 105 // static |
111 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { | 106 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { |
112 return gfx::Size(NSSizeToCGSize([ExtensionPopupController minPopupSize])); | 107 return gfx::Size(NSSizeToCGSize([ExtensionPopupController minPopupSize])); |
113 } | 108 } |
114 | 109 |
115 // static | 110 // static |
116 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { | 111 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { |
117 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize])); | 112 return gfx::Size(NSSizeToCGSize([ExtensionPopupController maxPopupSize])); |
118 } | 113 } |
OLD | NEW |