| 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);
|
|
|