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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu_browsertest.cc

Issue 891213002: Add a test for the mouseleave event on window. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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());
}

Powered by Google App Engine
This is Rietveld 408576698