OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
10 #include "chrome/browser/views/browser_actions_container.h" | 10 #include "chrome/browser/views/browser_actions_container.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 return GetContainer(browser_)->VisibleBrowserActions(); | 34 return GetContainer(browser_)->VisibleBrowserActions(); |
35 } | 35 } |
36 | 36 |
37 void BrowserActionTestUtil::WaitForBrowserActionUpdated(int index) { | 37 void BrowserActionTestUtil::WaitForBrowserActionUpdated(int index) { |
38 ui_test_utils::WaitForBrowserActionUpdated( | 38 ui_test_utils::WaitForBrowserActionUpdated( |
39 GetContainer(browser_)->GetBrowserActionViewAt(index)-> | 39 GetContainer(browser_)->GetBrowserActionViewAt(index)-> |
40 button()->extension()->browser_action()); | 40 button()->extension()->browser_action()); |
41 } | 41 } |
42 | 42 |
43 bool BrowserActionTestUtil::HasIcon(int index) { | 43 bool BrowserActionTestUtil::HasIcon(int index) { |
44 return !GetContainer(browser_)->GetBrowserActionViewAt(index)-> | 44 return GetContainer(browser_)->GetBrowserActionViewAt(index)->button()-> |
45 button()->icon().empty(); | 45 HasIcon(); |
46 } | 46 } |
47 | 47 |
48 void BrowserActionTestUtil::Press(int index) { | 48 void BrowserActionTestUtil::Press(int index) { |
49 GetContainer(browser_)->TestExecuteBrowserAction(index); | 49 GetContainer(browser_)->TestExecuteBrowserAction(index); |
50 } | 50 } |
51 | 51 |
52 std::string BrowserActionTestUtil::GetExtensionId(int index) { | 52 std::string BrowserActionTestUtil::GetExtensionId(int index) { |
53 BrowserActionButton* button = | 53 BrowserActionButton* button = |
54 GetContainer(browser_)->GetBrowserActionViewAt(index)->button(); | 54 GetContainer(browser_)->GetBrowserActionViewAt(index)->button(); |
55 return button->extension()->id(); | 55 return button->extension()->id(); |
(...skipping 24 matching lines...) Expand all Loading... |
80 GetContainer(browser_)->TestSetIconVisibilityCount(icons); | 80 GetContainer(browser_)->TestSetIconVisibilityCount(icons); |
81 } | 81 } |
82 | 82 |
83 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { | 83 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { |
84 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); | 84 return gfx::Size(ExtensionPopup::kMinWidth, ExtensionPopup::kMinHeight); |
85 } | 85 } |
86 | 86 |
87 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { | 87 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { |
88 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); | 88 return gfx::Size(ExtensionPopup::kMaxWidth, ExtensionPopup::kMaxHeight); |
89 } | 89 } |
OLD | NEW |