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 /chrome/browser | |
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 'chrome/browser')
-rw-r--r-- | chrome/browser/gtk/bookmark_manager_browsertest.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/chrome/browser/gtk/bookmark_manager_browsertest.cc b/chrome/browser/gtk/bookmark_manager_browsertest.cc index 485a661d..1d8b8b0 100644 --- a/chrome/browser/gtk/bookmark_manager_browsertest.cc +++ b/chrome/browser/gtk/bookmark_manager_browsertest.cc @@ -7,6 +7,7 @@ #include "chrome/browser/bookmarks/bookmark_model.h" #include "chrome/browser/bookmarks/bookmark_model_observer.h" #include "chrome/browser/browser.h" +#include "chrome/browser/browser_window.h" #include "chrome/browser/profile.h" #include "chrome/browser/gtk/bookmark_manager_gtk.h" #include "chrome/test/in_process_browser_test.h" @@ -80,4 +81,13 @@ IN_PROC_BROWSER_TEST_F(BookmarkManagerTest, Crash) { manager_->SelectInTree(model_->GetBookmarkBarNode(), true); CleanUp(); +#if defined(TOOLKIT_VIEWS) + // The test fails on toolkit_views build without the following + // cleanup code. This is because the bookmark bar view refuses to + // be destroyed by a bookmark model when the BrowserProcessImpl + // destroys the bookmark bar model. + // TODO(oshima): http://crbug/28046. + browser()->window()->Close(); + MessageLoopForUI::current()->RunAllPending(); +#endif } |