| Index: content/browser/renderer_host/input/touch_emulator_unittest.cc
|
| diff --git a/content/browser/renderer_host/input/touch_emulator_unittest.cc b/content/browser/renderer_host/input/touch_emulator_unittest.cc
|
| index 600badd5bcb77f3cb654baabda7f6935e6a660d3..ee1a05cfe0aa4667ef96e371296b1623d7a53bcd 100644
|
| --- a/content/browser/renderer_host/input/touch_emulator_unittest.cc
|
| +++ b/content/browser/renderer_host/input/touch_emulator_unittest.cc
|
| @@ -114,10 +114,7 @@ class TouchEmulatorTest : public testing::Test,
|
| }
|
|
|
| void SendKeyboardEvent(WebInputEvent::Type type) {
|
| - WebKeyboardEvent event;
|
| - event.timeStampSeconds = GetNextEventTimeSeconds();
|
| - event.type = type;
|
| - event.modifiers = modifiers();
|
| + WebKeyboardEvent event(type, modifiers(), GetNextEventTimeSeconds());
|
| emulator()->HandleKeyboardEvent(event);
|
| }
|
|
|
| @@ -134,12 +131,9 @@ class TouchEmulatorTest : public testing::Test,
|
| }
|
|
|
| void SendMouseEvent(WebInputEvent::Type type, int x, int y) {
|
| - WebMouseEvent event;
|
| - event.timeStampSeconds = GetNextEventTimeSeconds();
|
| - event.type = type;
|
| + WebMouseEvent event(type, modifiers(), GetNextEventTimeSeconds());
|
| event.button = mouse_pressed_ ? WebMouseEvent::Button::Left :
|
| WebMouseEvent::Button::NoButton;
|
| - event.modifiers = modifiers();
|
| last_mouse_x_ = x;
|
| last_mouse_y_ = y;
|
| event.x = event.windowX = event.globalX = x;
|
| @@ -148,9 +142,8 @@ class TouchEmulatorTest : public testing::Test,
|
| }
|
|
|
| bool SendMouseWheelEvent() {
|
| - WebMouseWheelEvent event;
|
| - event.type = WebInputEvent::MouseWheel;
|
| - event.timeStampSeconds = GetNextEventTimeSeconds();
|
| + WebMouseWheelEvent event(WebInputEvent::MouseWheel, modifiers(),
|
| + GetNextEventTimeSeconds());
|
| // Return whether mouse wheel is forwarded.
|
| return !emulator()->HandleMouseWheelEvent(event);
|
| }
|
| @@ -198,9 +191,7 @@ class TouchEmulatorTest : public testing::Test,
|
|
|
| WebTouchEvent MakeTouchEvent(WebInputEvent::Type type,
|
| WebTouchPoint::State state, int x, int y) {
|
| - WebTouchEvent event;
|
| - event.type = type;
|
| - event.timeStampSeconds = GetNextEventTimeSeconds();
|
| + WebTouchEvent event(type, modifiers(), GetNextEventTimeSeconds());
|
| event.touchesLength = 1;
|
| event.touches[0].id = 0;
|
| event.touches[0].state = state;
|
|
|