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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc

Issue 10154013: Fixes crash in closing menus. There are two issues here: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: OnOwnerClosing and more comments Created 8 years, 8 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 | « no previous file | chrome/test/base/view_event_test_base.cc » ('j') | ui/views/controls/menu/menu_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
index 7944edebfe5a5eda3fa83051cefaddb35dbe13fd..62465f56b362c38ded0cb7a50f11cba216b60d02 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/prefs/pref_service.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
+#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
@@ -196,6 +197,7 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase {
model_->ClearStore();
bb_view_.reset(new BookmarkBarView(browser_.get()));
+ bb_view_->set_parent_owned(false);
bb_view_->SetPageNavigator(&navigator_);
AddTestData(CreateBigMenu());
@@ -235,6 +237,8 @@ class BookmarkBarViewEventTestBase : public ViewEventTestBase {
bb_view_.reset();
browser_.reset();
profile_.reset();
+
+ // Run the message loop to ensure we delete allTasks and fully shut down.
MessageLoop::current()->PostTask(FROM_HERE, MessageLoop::QuitClosure());
MessageLoop::current()->Run();
@@ -1401,11 +1405,13 @@ class BookmarkBarViewTest16 : public BookmarkBarViewEventTestBase {
// Close the window.
window_->Close();
window_ = NULL;
+
+ MessageLoop::current()->PostTask(
+ FROM_HERE, CreateEventTask(this, &BookmarkBarViewTest16::Done));
}
};
-// Disabled, http://crbug.com/64303.
-VIEW_TEST(BookmarkBarViewTest16, DISABLED_DeleteMenu)
+VIEW_TEST(BookmarkBarViewTest16, DeleteMenu)
// Makes sure right clicking on an item while a context menu is already showing
// doesn't crash and works.
« no previous file with comments | « no previous file | chrome/test/base/view_event_test_base.cc » ('j') | ui/views/controls/menu/menu_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698