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

Unified Diff: chrome/browser/download/download_browsertest.cc

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (Closed)
Patch Set: Rebase Created 3 years, 12 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/download/download_browsertest.cc
diff --git a/chrome/browser/download/download_browsertest.cc b/chrome/browser/download/download_browsertest.cc
index e6aa494a9d605776d517d7e0194365e4bd59b954..954d03c1f0e500aa7874ed7741e8c27dca1fd0be 100644
--- a/chrome/browser/download/download_browsertest.cc
+++ b/chrome/browser/download/download_browsertest.cc
@@ -2621,15 +2621,15 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, LoadURLExternallyReferrerPolicy) {
// Click on the link with the alt key pressed. This will download the link
// target.
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
- blink::WebMouseEvent mouse_event;
- mouse_event.type = blink::WebInputEvent::MouseDown;
+ blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown,
+ blink::WebInputEvent::AltKey,
+ blink::WebInputEvent::TimeStampForTesting);
mouse_event.button = blink::WebMouseEvent::Button::Left;
mouse_event.x = 15;
mouse_event.y = 15;
mouse_event.clickCount = 1;
- mouse_event.modifiers = blink::WebInputEvent::AltKey;
tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
- mouse_event.type = blink::WebInputEvent::MouseUp;
+ mouse_event.setType(blink::WebInputEvent::MouseUp);
tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
waiter->WaitForFinished();
@@ -2678,14 +2678,15 @@ IN_PROC_BROWSER_TEST_F(DownloadTest, SaveLinkAsReferrerPolicyOrigin) {
IDC_CONTENT_CONTEXT_SAVELINKAS);
WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
- blink::WebMouseEvent mouse_event;
- mouse_event.type = blink::WebInputEvent::MouseDown;
+ blink::WebMouseEvent mouse_event(blink::WebInputEvent::MouseDown,
+ blink::WebInputEvent::NoModifiers,
+ blink::WebInputEvent::TimeStampForTesting);
mouse_event.button = blink::WebMouseEvent::Button::Right;
mouse_event.x = 15;
mouse_event.y = 15;
mouse_event.clickCount = 1;
tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
- mouse_event.type = blink::WebInputEvent::MouseUp;
+ mouse_event.setType(blink::WebInputEvent::MouseUp);
tab->GetRenderViewHost()->GetWidget()->ForwardMouseEvent(mouse_event);
waiter->WaitForFinished();

Powered by Google App Engine
This is Rietveld 408576698