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

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

Issue 339092: Test case for fix to bug 26279. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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/views/bookmark_bar_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/bookmark_bar_view_test.cc
===================================================================
--- chrome/browser/views/bookmark_bar_view_test.cc (revision 30584)
+++ chrome/browser/views/bookmark_bar_view_test.cc (working copy)
@@ -1057,3 +1057,35 @@
};
VIEW_TEST(BookmarkBarViewTest13, ClickOnContextMenuSeparator)
+
+// Makes sure right cliking on a folder on the bookmark bar doesn't result in
+// both a context menu and showing the menu.
+class BookmarkBarViewTest14 : public BookmarkBarViewEventTestBase {
+ protected:
+ virtual void DoTestOnMessageLoop() {
+ // Move the mouse to the first folder on the bookmark bar and press the
+ // right mouse button.
+ views::TextButton* button = bb_view_->GetBookmarkButton(0);
+ ui_controls::MoveMouseToCenterAndPress(button, ui_controls::RIGHT,
+ ui_controls::DOWN | ui_controls::UP,
+ CreateEventTask(this, &BookmarkBarViewTest14::Step2));
+ }
+
+ private:
+ void Step2() {
+ // Menu should NOT be showing.
+ views::MenuItemView* menu = bb_view_->GetMenu();
+ ASSERT_TRUE(menu == NULL);
+
+ // Send escape so that the context menu hides.
+ ui_controls::SendKeyPressNotifyWhenDone(
+ NULL, base::VKEY_ESCAPE, false, false, false,
+ CreateEventTask(this, &BookmarkBarViewTest14::Step3));
+ }
+
+ void Step3() {
+ Done();
+ }
+};
+
+VIEW_TEST(BookmarkBarViewTest14, ContextMenus2)
« no previous file with comments | « chrome/browser/views/bookmark_bar_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698