diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 04:27:05 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-18 04:27:05 +0000 |
commit | fdeae91eb3ac9cc18e5969cc65f3efb593005734 (patch) | |
tree | d8a7ae945a5615d990a3fbba235bbd4d092879ec /views | |
parent | b471ea7028c28eb6b192de34717f3d20c34c2165 (diff) | |
download | chromium_src-fdeae91eb3ac9cc18e5969cc65f3efb593005734.zip chromium_src-fdeae91eb3ac9cc18e5969cc65f3efb593005734.tar.gz chromium_src-fdeae91eb3ac9cc18e5969cc65f3efb593005734.tar.bz2 |
Fix for BookmarkManager Test Crash test.
* Test was failing because the key events were sent even after
the window has been destroyed.
* Make sure browser window is closed before the end of test.
Test fails in BookmarkBarView without this. I think this requires
a fix on browser side. Filed a bug 28046.
BUG=None
Test=run browser_tests --gtest_filter=*Bookmark*
Review URL: http://codereview.chromium.org/397034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32286 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views')
-rw-r--r-- | views/focus/accelerator_handler_gtk.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/views/focus/accelerator_handler_gtk.cc b/views/focus/accelerator_handler_gtk.cc index bb519bb..1ff5d81 100644 --- a/views/focus/accelerator_handler_gtk.cc +++ b/views/focus/accelerator_handler_gtk.cc @@ -5,7 +5,6 @@ #include <gtk/gtk.h> #include "views/focus/accelerator_handler.h" - #include "views/focus/focus_manager.h" #include "views/widget/widget_gtk.h" #include "views/window/window_gtk.h" @@ -26,6 +25,11 @@ bool AcceleratorHandler::Dispatch(GdkEvent* event) { GdkWindow* window = gdk_window_get_toplevel(key_event->window); gpointer ptr; gdk_window_get_user_data(window, &ptr); + if (!ptr && !gdk_window_is_visible(window)) { + // The window is destroyed while we're handling key events. + gtk_main_do_event(event); + return true; + } DCHECK(ptr); // The top-level window is expected to always be associated // with the top-level gtk widget. WindowGtk* widget = |