| 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 247721)
|
| +++ trunk/src/chrome/browser/ui/views/bookmarks/bookmark_bar_view_test.cc (working copy)
|
| @@ -432,10 +432,9 @@
|
| // Observer that posts task upon the context menu creation.
|
| // This is necessary for Linux as the context menu has to check
|
| // the clipboard, which invokes the event loop.
|
| -class BookmarkContextMenuNotificationObserver
|
| - : public content::NotificationObserver {
|
| +class ContextMenuNotificationObserver : public content::NotificationObserver {
|
| public:
|
| - explicit BookmarkContextMenuNotificationObserver(const base::Closure& task)
|
| + explicit ContextMenuNotificationObserver(const base::Closure& task)
|
| : task_(task) {
|
| registrar_.Add(this,
|
| chrome::NOTIFICATION_BOOKMARK_CONTEXT_MENU_SHOWN,
|
| @@ -455,7 +454,7 @@
|
| content::NotificationRegistrar registrar_;
|
| base::Closure task_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(BookmarkContextMenuNotificationObserver);
|
| + DISALLOW_COPY_AND_ASSIGN(ContextMenuNotificationObserver);
|
| };
|
|
|
| // Tests context menus by way of opening a context menu for a bookmark,
|
| @@ -491,7 +490,7 @@
|
| // Right click on the first child to get its context menu.
|
| ui_test_utils::MoveMouseToCenterAndPress(child_menu, ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step3 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step3 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| void Step3() {
|
| @@ -513,7 +512,7 @@
|
| Done();
|
| }
|
|
|
| - BookmarkContextMenuNotificationObserver observer_;
|
| + ContextMenuNotificationObserver observer_;
|
| };
|
|
|
| VIEW_TEST(BookmarkBarViewTest4, ContextMenus)
|
| @@ -1045,7 +1044,7 @@
|
| // Right click on the first child to get its context menu.
|
| ui_test_utils::MoveMouseToCenterAndPress(child_menu, ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step3 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step3 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| void Step3() {
|
| @@ -1082,7 +1081,7 @@
|
| Done();
|
| }
|
|
|
| - BookmarkContextMenuNotificationObserver observer_;
|
| + ContextMenuNotificationObserver observer_;
|
| };
|
|
|
| #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
|
| @@ -1219,7 +1218,7 @@
|
| // Right click on the first child to get its context menu.
|
| ui_test_utils::MoveMouseToCenterAndPress(child_menu, ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step3 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step3 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| void Step3() {
|
| @@ -1266,7 +1265,7 @@
|
| Done();
|
| }
|
|
|
| - BookmarkContextMenuNotificationObserver observer_;
|
| + ContextMenuNotificationObserver observer_;
|
| };
|
|
|
| VIEW_TEST(BookmarkBarViewTest13, ClickOnContextMenuSeparator)
|
| @@ -1286,7 +1285,7 @@
|
| views::TextButton* button = GetBookmarkButton(0);
|
| ui_test_utils::MoveMouseToCenterAndPress(button, ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step2 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step2 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| private:
|
| @@ -1306,7 +1305,7 @@
|
| Done();
|
| }
|
|
|
| - BookmarkContextMenuNotificationObserver observer_;
|
| + ContextMenuNotificationObserver observer_;
|
| };
|
|
|
| VIEW_TEST(BookmarkBarViewTest14, ContextMenus2)
|
| @@ -1344,7 +1343,7 @@
|
| // Right click on the second child to get its context menu.
|
| ui_test_utils::MoveMouseToCenterAndPress(child_menu, ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step3 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step3 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| void Step3() {
|
| @@ -1383,7 +1382,7 @@
|
| }
|
|
|
| int deleted_menu_id_;
|
| - BookmarkContextMenuNotificationObserver observer_;
|
| + ContextMenuNotificationObserver observer_;
|
| };
|
|
|
| VIEW_TEST(BookmarkBarViewTest15, MenuStaysVisibleAfterDelete)
|
| @@ -1459,7 +1458,7 @@
|
| ASSERT_TRUE(child_menu != NULL);
|
| ui_test_utils::MoveMouseToCenterAndPress(child_menu, ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step3 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step3 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| void Step3() {
|
| @@ -1487,7 +1486,7 @@
|
| observer_.set_task(CreateEventTask(this, &BookmarkBarViewTest17::Step4));
|
| MoveMouseAndPress(clickable_rect.CenterPoint(), ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step4 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step4 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| void Step4() {
|
| @@ -1505,7 +1504,7 @@
|
| Done();
|
| }
|
|
|
| - BookmarkContextMenuNotificationObserver observer_;
|
| + ContextMenuNotificationObserver observer_;
|
| };
|
|
|
| #if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(USE_AURA)
|
| @@ -1792,7 +1791,7 @@
|
| // Right click on the first child to get its context menu.
|
| ui_test_utils::MoveMouseToCenterAndPress(view, ui_controls::RIGHT,
|
| ui_controls::DOWN | ui_controls::UP, base::Closure());
|
| - // Step3 will be invoked by BookmarkContextMenuNotificationObserver.
|
| + // Step3 will be invoked by ContextMenuNotificationObserver.
|
| }
|
|
|
| // Confirm that context menu shows and click REMOVE menu.
|
| @@ -1824,7 +1823,7 @@
|
| Done();
|
| }
|
|
|
| - BookmarkContextMenuNotificationObserver observer_;
|
| + ContextMenuNotificationObserver observer_;
|
| };
|
|
|
| VIEW_TEST(BookmarkBarViewTest21, ContextMenusForEmptyFolder)
|
|
|