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

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

Issue 275783002: Fix an ExtensionPopup crash on browser window close. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 bcfe55cad2c416498a3437fb842815e72c436731..94f78ad1688314e0ef5693219c8611ed82814713 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
@@ -19,10 +19,8 @@
namespace {
BrowserActionsContainer* GetContainer(Browser* browser) {
- BrowserActionsContainer* container =
- browser->window()->GetBrowserWindowTesting()->GetToolbarView()->
- browser_actions();
- return container;
+ return browser->window()->GetBrowserWindowTesting()->GetToolbarView()->
+ browser_actions();
}
} // namespace
@@ -41,6 +39,10 @@ ExtensionAction* BrowserActionTestUtil::GetExtensionAction(int index) {
button()->extension());
}
+void BrowserActionTestUtil::InspectPopup(int index) {
+ GetContainer(browser_)->InspectPopup(GetExtensionAction(index));
+}
+
bool BrowserActionTestUtil::HasIcon(int index) {
return GetContainer(browser_)->GetBrowserActionViewAt(index)->button()->
HasIcon();
@@ -78,8 +80,7 @@ gfx::Rect BrowserActionTestUtil::GetPopupBounds() {
}
bool BrowserActionTestUtil::HidePopup() {
- BrowserActionsContainer* container = GetContainer(browser_);
- container->HidePopup();
+ GetContainer(browser_)->HidePopup();
return !HasPopup();
}
« no previous file with comments | « chrome/browser/ui/views/extensions/extension_popup.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698