Chromium Code Reviews| Index: chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc |
| diff --git a/chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc b/chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc |
| index 900581b4168f2bd56e2d9bd6a4ed64bfd9067f90..b86fbe41841f3c1a4e2c30f018d737b3e2093f46 100644 |
| --- a/chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc |
| +++ b/chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc |
| @@ -11,20 +11,11 @@ |
| #include "content/public/browser/notification_service.h" |
| ContextMenuNotificationObserver::ContextMenuNotificationObserver( |
| - int command_to_execute, |
| - int expected_notification) |
| - : command_to_execute_(command_to_execute), |
| - expected_notification_(expected_notification), |
| - seen_expected_notification_(false) { |
| + int command_to_execute) |
|
jar (doing other things)
2012/06/14 04:50:29
nit: arg wrap not needed (I think)
jbates
2012/06/15 02:20:38
Done.
|
| + : command_to_execute_(command_to_execute) { |
| registrar_.Add(this, |
| chrome::NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_SHOWN, |
| content::NotificationService::AllSources()); |
| - registrar_.Add(this, |
| - chrome::NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_CLOSED, |
| - content::NotificationService::AllSources()); |
| - registrar_.Add(this, |
| - expected_notification_, |
| - content::NotificationService::AllSources()); |
| } |
| ContextMenuNotificationObserver::~ContextMenuNotificationObserver() { |
| @@ -34,11 +25,6 @@ void ContextMenuNotificationObserver::Observe( |
| int type, |
| const content::NotificationSource& source, |
| const content::NotificationDetails& details) { |
| - if (type == expected_notification_) { |
| - seen_expected_notification_ = true; |
| - return; |
| - } |
| - |
| switch (type) { |
| case chrome::NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_SHOWN: { |
| RenderViewContextMenu* context_menu = |
| @@ -49,17 +35,6 @@ void ContextMenuNotificationObserver::Observe( |
| base::Unretained(this), context_menu)); |
| break; |
| } |
| - case chrome::NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_CLOSED: { |
| - // Aura is running a nested message loop for menus. That means that |
| - // whatever the test running us is waiting for (e.g. a new tab to be |
| - // added) happened while the menu message loop was running, so the |
| - // message loop run by this test never quits. |
| - if (seen_expected_notification_ && |
| - MessageLoop::current()->is_running()) { |
| - MessageLoop::current()->QuitNow(); |
| - } |
| - break; |
| - } |
| default: |
| NOTREACHED(); |