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

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

Issue 13565004: Revert 192525 "Context menu on views must show on mouse down for..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | trunk/src/chrome/browser/ui/views/browser_action_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc
===================================================================
--- trunk/src/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc (revision 192531)
+++ trunk/src/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc (working copy)
@@ -69,26 +69,6 @@
GURL url_;
};
-// Delay before allowing menu selection. When context menu is shown on mouse
-// press, we enforce a delay before a selection can be made. So for tests that
-// perform selection on context menu, we add this delay before going to the next
-// step. See comment on |kContextMenuSelectionHoldTimeMs| in menu_controller.cc
-// for more info. The delay here should be greater than
-// |kContextMenuSelectionHoldTimeMs|.
-#define STEP_3_WITH_SELECTION_DELAY(test_class)\
- void Step3() {\
- views::MenuItemView* menu = bb_view_->GetContextMenu();\
- ASSERT_TRUE(menu && menu->GetSubmenu() && menu->GetSubmenu()->IsShowing());\
- if (views::View::ShouldShowContextMenuOnMousePress()) {\
- MessageLoop::current()->PostDelayedTask(FROM_HERE,\
- CreateEventTask(this, &test_class::Step3_1),\
- base::TimeDelta::FromMilliseconds(250));\
- } else {\
- Step3_1();\
- }\
- }\
- void Step3_1() {
-
} // namespace
// Base class for event generating bookmark view tests. These test are intended
@@ -502,7 +482,7 @@
// Step3 will be invoked by ContextMenuNotificationObserver.
}
- STEP_3_WITH_SELECTION_DELAY(BookmarkBarViewTest4)
+ void Step3() {
// Make sure the context menu is showing.
views::MenuItemView* menu = bb_view_->GetContextMenu();
ASSERT_TRUE(menu != NULL);
@@ -1129,7 +1109,7 @@
CreateEventTask(this, &BookmarkBarViewTest12::Step3));
}
- STEP_3_WITH_SELECTION_DELAY(BookmarkBarViewTest12)
+ void Step3() {
// Make sure the context menu is showing.
views::MenuItemView* menu = bb_view_->GetContextMenu();
ASSERT_TRUE(menu && menu->GetSubmenu() && menu->GetSubmenu()->IsShowing());
@@ -1215,7 +1195,7 @@
// Step3 will be invoked by ContextMenuNotificationObserver.
}
- STEP_3_WITH_SELECTION_DELAY(BookmarkBarViewTest13)
+ void Step3() {
// Make sure the context menu is showing.
views::MenuItemView* menu = bb_view_->GetContextMenu();
ASSERT_TRUE(menu != NULL);
@@ -1342,7 +1322,7 @@
// Step3 will be invoked by ContextMenuNotificationObserver.
}
- STEP_3_WITH_SELECTION_DELAY(BookmarkBarViewTest15)
+ void Step3() {
// Make sure the context menu is showing.
views::MenuItemView* menu = bb_view_->GetContextMenu();
ASSERT_TRUE(menu != NULL);
@@ -1769,7 +1749,7 @@
}
// Confirm that context menu shows and click REMOVE menu.
- STEP_3_WITH_SELECTION_DELAY(BookmarkBarViewTest21)
+ void Step3() {
// Make sure the context menu is showing.
views::MenuItemView* menu = bb_view_->GetContextMenu();
ASSERT_TRUE(menu != NULL);
« no previous file with comments | « no previous file | trunk/src/chrome/browser/ui/views/browser_action_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698