Index: chrome/browser/extensions/browser_action_test_util_gtk.cc |
diff --git a/chrome/browser/extensions/browser_action_test_util_gtk.cc b/chrome/browser/extensions/browser_action_test_util_gtk.cc |
index 7761946e3e26f72139b94c761ee58c93b86a3dbb..99a3bc780cd2771ee214890becb8140a71d1a421 100644 |
--- a/chrome/browser/extensions/browser_action_test_util_gtk.cc |
+++ b/chrome/browser/extensions/browser_action_test_util_gtk.cc |
@@ -15,13 +15,14 @@ |
namespace { |
GtkWidget* GetButton(Browser* browser, int index) { |
- GtkWidget* button = NULL; |
GtkWidget* toolbar = |
ViewIDUtil::GetWidget(GTK_WIDGET(browser->window()->GetNativeHandle()), |
VIEW_ID_BROWSER_ACTION_TOOLBAR); |
+ GtkWidget* button = NULL; |
if (toolbar) { |
GList* children = gtk_container_get_children(GTK_CONTAINER(toolbar)); |
- button = static_cast<GtkWidget*>(g_list_nth(children, index)->data); |
+ GtkWidget* alignment = static_cast<GtkWidget*>(g_list_nth(children, index)->data); |
+ button = gtk_bin_get_child(GTK_BIN(alignment)); |
g_list_free(children); |
} |
return button; |