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

Unified Diff: chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc

Issue 419023002: Move ShowPopup logic from BrowserActionsContainer to BrowserActionView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc
diff --git a/chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc b/chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc
index a4e0e6cb7a2f6293a8b4555f688669150209ed6f..ecaca2c0034d5e5a53df7d50005d051f3918f0ce 100644
--- a/chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc
+++ b/chrome/browser/ui/views/toolbar/browser_action_test_util_views.cc
@@ -41,7 +41,10 @@ ExtensionAction* BrowserActionTestUtil::GetExtensionAction(int index) {
}
void BrowserActionTestUtil::InspectPopup(int index) {
- GetContainer(browser_)->InspectPopup(GetExtensionAction(index));
+ BrowserActionButton* button =
+ GetContainer(browser_)->GetBrowserActionViewAt(index)->button();
+ static_cast<ExtensionContextMenuModel::PopupDelegate*>(button)->InspectPopup(
+ button->browser_action());
}
bool BrowserActionTestUtil::HasIcon(int index) {
@@ -56,7 +59,8 @@ gfx::Image BrowserActionTestUtil::GetIcon(int index) {
}
void BrowserActionTestUtil::Press(int index) {
- GetContainer(browser_)->TestExecuteBrowserAction(index);
+ GetContainer(browser_)->GetBrowserActionViewAt(index)
+ ->button()->ExecuteBrowserAction();
Peter Kasting 2014/07/26 02:33:20 Nit: Personally, "operators go on the ends of line
Devlin 2014/07/29 19:07:14 Yeah, git cl format formed a bad habit before we d
}
std::string BrowserActionTestUtil::GetExtensionId(int index) {
@@ -85,7 +89,7 @@ gfx::Rect BrowserActionTestUtil::GetPopupBounds() {
}
bool BrowserActionTestUtil::HidePopup() {
- GetContainer(browser_)->HidePopup();
+ GetContainer(browser_)->HideActivePopup();
return !HasPopup();
}

Powered by Google App Engine
This is Rietveld 408576698