Index: chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc |
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc |
index 7d50614d1f37f4ce32fa06a3e99d6308a5e839d6..ae93e95b2fda6023f6dea2b59707d92d493beb41 100644 |
--- a/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc |
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc |
@@ -254,8 +254,7 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, OpenIncognitoNoneReferrer) { |
// Check filename on clicking "Save Link As" via a "real" context menu. |
IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, SuggestedFileName) { |
// Register observer. |
- SaveLinkAsContextMenuObserver menu_observer( |
- content::NotificationService::AllSources()); |
+ ContextMenuWaiter menu_observer(content::NotificationService::AllSources()); |
// Go to a page with a link having download attribute. |
const std::string kSuggestedFilename("test_filename.png"); |
@@ -277,10 +276,10 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, SuggestedFileName) { |
tab->GetRenderViewHost()->ForwardMouseEvent(mouse_event); |
// Wait for context menu to be visible. |
- menu_observer.WaitForMenu(); |
+ menu_observer.WaitForMenuOpenAndClose(); |
// Compare filename. |
- base::string16 suggested_filename = menu_observer.GetSuggestedFilename(); |
+ base::string16 suggested_filename = menu_observer.params().suggested_filename; |
ASSERT_EQ(kSuggestedFilename, base::UTF16ToUTF8(suggested_filename).c_str()); |
} |