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

Unified Diff: components/printing/test/print_web_view_helper_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: components/printing/test/print_web_view_helper_browsertest.cc
diff --git a/components/printing/test/print_web_view_helper_browsertest.cc b/components/printing/test/print_web_view_helper_browsertest.cc
index 6609fbc59fffe91b322581fb4665a40c7c5fcbf7..213bc875056e475e159444b2ab5fdcbc89b04fe7 100644
--- a/components/printing/test/print_web_view_helper_browsertest.cc
+++ b/components/printing/test/print_web_view_helper_browsertest.cc
@@ -645,14 +645,15 @@ TEST_F(MAYBE_PrintWebViewHelperPreviewTest, PrintWithJavaScript) {
gfx::Rect bounds = GetElementBounds("print");
EXPECT_FALSE(bounds.IsEmpty());
- 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::Left;
mouse_event.x = bounds.CenterPoint().x();
mouse_event.y = bounds.CenterPoint().y();
mouse_event.clickCount = 1;
SendWebMouseEvent(mouse_event);
- mouse_event.type = blink::WebInputEvent::MouseUp;
+ mouse_event.setType(blink::WebInputEvent::MouseUp);
SendWebMouseEvent(mouse_event);
VerifyPreviewRequest(true);

Powered by Google App Engine
This is Rietveld 408576698