| Index: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| index 374adaf7afa355201721d2b1742846e9d26a12b9..12266b34e9e209a609c7a9107738254296737b18 100644
|
| --- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| +++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
|
| @@ -3756,12 +3756,32 @@ TEST_F(RenderWidgetHostViewAuraWithViewHarnessTest,
|
|
|
| // A context menu request with the MENU_SOURCE_TOUCH source type should
|
| // result in the MockWebContentsViewDelegate::ShowContextMenu method
|
| - // getting called on non Windows platforms. This means that the request
|
| - // worked correctly. On Windows this should be blocked.
|
| + // getting called on all platforms. This means that the request worked
|
| + // correctly.
|
| delegate->ClearState();
|
| context_menu_params.source_type = ui::MENU_SOURCE_TOUCH;
|
| contents()->ShowContextMenu(contents()->GetRenderViewHost()->GetMainFrame(),
|
| context_menu_params);
|
| + EXPECT_TRUE(delegate->context_menu_request_received());
|
| +
|
| + // A context menu request with the MENU_SOURCE_LONG_TAP source type should
|
| + // result in the MockWebContentsViewDelegate::ShowContextMenu method
|
| + // getting called on all platforms. This means that the request worked
|
| + // correctly.
|
| + delegate->ClearState();
|
| + context_menu_params.source_type = ui::MENU_SOURCE_LONG_TAP;
|
| + contents()->ShowContextMenu(contents()->GetRenderViewHost()->GetMainFrame(),
|
| + context_menu_params);
|
| + EXPECT_TRUE(delegate->context_menu_request_received());
|
| +
|
| + // A context menu request with the MENU_SOURCE_LONG_PRESS source type should
|
| + // result in the MockWebContentsViewDelegate::ShowContextMenu method
|
| + // getting called on non Windows platforms. This means that the request
|
| + // worked correctly. On Windows this should be blocked.
|
| + delegate->ClearState();
|
| + context_menu_params.source_type = ui::MENU_SOURCE_LONG_PRESS;
|
| + contents()->ShowContextMenu(contents()->GetRenderViewHost()->GetMainFrame(),
|
| + context_menu_params);
|
| #if defined(OS_WIN)
|
| EXPECT_FALSE(delegate->context_menu_request_received());
|
| #else
|
| @@ -3780,7 +3800,7 @@ TEST_F(RenderWidgetHostViewAuraWithViewHarnessTest,
|
| view()->OnGestureEvent(&gesture_event);
|
|
|
| EXPECT_TRUE(delegate->context_menu_request_received());
|
| - EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_MOUSE);
|
| + EXPECT_EQ(delegate->context_menu_source_type(), ui::MENU_SOURCE_TOUCH);
|
| #endif
|
|
|
| RenderViewHostFactory::set_is_real_render_view_host(false);
|
|
|