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

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

Issue 2782893002: WebMouseEvent coordinates are now fractional & private (Closed)
Patch Set: Rebased, fixed a comment in web_input_event_builders_mac.mm Created 3 years, 8 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 3fd63bd12a50ce3ecae00d3881ac820e7e4d6a40..ec6b63ed787798a95d4fd3e70c403e9b5b90855e 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
@@ -214,13 +214,11 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, RealMenu) {
blink::WebInputEvent::NoModifiers,
blink::WebInputEvent::TimeStampForTesting);
mouse_event.button = blink::WebMouseEvent::Button::Right;
- mouse_event.x = 15;
- mouse_event.y = 15;
+ mouse_event.setPositionInWidget(15, 15);
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
gfx::Rect offset = tab->GetContainerBounds();
- mouse_event.globalX = 15 + offset.x();
- mouse_event.globalY = 15 + offset.y();
+ mouse_event.setPositionInScreen(15 + offset.x(), 15 + offset.y());
mouse_event.clickCount = 1;
tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
mouse_event.setType(blink::WebInputEvent::MouseUp);
@@ -356,8 +354,7 @@ IN_PROC_BROWSER_TEST_F(ContextMenuBrowserTest, SuggestedFileName) {
blink::WebInputEvent::NoModifiers,
blink::WebInputEvent::TimeStampForTesting);
mouse_event.button = blink::WebMouseEvent::Button::Right;
- mouse_event.x = 15;
- mouse_event.y = 15;
+ mouse_event.setPositionInWidget(15, 15);
content::WebContents* tab =
browser()->tab_strip_model()->GetActiveWebContents();
tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
« no previous file with comments | « chrome/browser/referrer_policy_browsertest.cc ('k') | chrome/browser/site_per_process_interactive_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698