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

Unified Diff: chrome/browser/ui/panels/panel_extension_browsertest.cc

Issue 2089933002: Context Menu Refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixing nits Created 4 years, 6 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/ui/panels/panel_extension_browsertest.cc
diff --git a/chrome/browser/ui/panels/panel_extension_browsertest.cc b/chrome/browser/ui/panels/panel_extension_browsertest.cc
index fe70e98df7ab1bf398a363d914dee8b3c09bbe38..3205cb28e82a631cb2d7a3df3204e5c6ee91d9ec 100644
--- a/chrome/browser/ui/panels/panel_extension_browsertest.cc
+++ b/chrome/browser/ui/panels/panel_extension_browsertest.cc
@@ -153,7 +153,8 @@ IN_PROC_BROWSER_TEST_F(PanelExtensionBrowserTest, BasicContextMenu) {
content::ContextMenuParams params;
params.page_url = web_contents->GetURL();
// Ensure context menu isn't swallowed by WebContentsDelegate (the panel).
- EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
+ EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(
+ web_contents->GetRenderWidgetHostView(), params));
std::unique_ptr<PanelContextMenu> menu(
new PanelContextMenu(web_contents->GetMainFrame(), params));
@@ -174,7 +175,8 @@ IN_PROC_BROWSER_TEST_F(PanelExtensionBrowserTest, BasicContextMenu) {
params.is_editable = true;
params.page_url = web_contents->GetURL();
// Ensure context menu isn't swallowed by WebContentsDelegate (the panel).
- EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
+ EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(
+ web_contents->GetRenderWidgetHostView(), params));
std::unique_ptr<PanelContextMenu> menu(
new PanelContextMenu(web_contents->GetMainFrame(), params));
@@ -195,7 +197,8 @@ IN_PROC_BROWSER_TEST_F(PanelExtensionBrowserTest, BasicContextMenu) {
params.page_url = web_contents->GetURL();
params.selection_text = base::ASCIIToUTF16("Select me");
// Ensure context menu isn't swallowed by WebContentsDelegate (the panel).
- EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
+ EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(
+ web_contents->GetRenderWidgetHostView(), params));
std::unique_ptr<PanelContextMenu> menu(
new PanelContextMenu(web_contents->GetMainFrame(), params));
@@ -216,7 +219,8 @@ IN_PROC_BROWSER_TEST_F(PanelExtensionBrowserTest, BasicContextMenu) {
params.page_url = web_contents->GetURL();
params.unfiltered_link_url = GURL("http://google.com/");
// Ensure context menu isn't swallowed by WebContentsDelegate (the panel).
- EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
+ EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(
+ web_contents->GetRenderWidgetHostView(), params));
std::unique_ptr<PanelContextMenu> menu(
new PanelContextMenu(web_contents->GetMainFrame(), params));
@@ -253,7 +257,8 @@ IN_PROC_BROWSER_TEST_F(PanelExtensionBrowserTest, CustomContextMenu) {
params.page_url = web_contents->GetURL();
// Ensure context menu isn't swallowed by WebContentsDelegate (the panel).
- EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(params));
+ EXPECT_FALSE(web_contents->GetDelegate()->HandleContextMenu(
+ web_contents->GetRenderWidgetHostView(), params));
// Verify menu contents contains the custom item added by their own extension.
std::unique_ptr<PanelContextMenu> menu;

Powered by Google App Engine
This is Rietveld 408576698