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

Unified Diff: content/browser/renderer_host/input/web_input_event_util_unittest.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: content/browser/renderer_host/input/web_input_event_util_unittest.cc
diff --git a/content/browser/renderer_host/input/web_input_event_util_unittest.cc b/content/browser/renderer_host/input/web_input_event_util_unittest.cc
index 9dcc3157b7ec72a68b5c0161a11157e3d7c78598..6444f9e2a3123f0ca14f9f4a0465fd924a0905dd 100644
--- a/content/browser/renderer_host/input/web_input_event_util_unittest.cc
+++ b/content/browser/renderer_host/input/web_input_event_util_unittest.cc
@@ -49,12 +49,11 @@ TEST(WebInputEventUtilTest, MotionEventConversion) {
event.set_flags(ui::EF_SHIFT_DOWN | ui::EF_ALT_DOWN);
event.set_unique_event_id(123456U);
- WebTouchEvent expected_event;
- expected_event.type = WebInputEvent::TouchStart;
+ WebTouchEvent expected_event(
+ WebInputEvent::TouchStart,
+ WebInputEvent::ShiftKey | WebInputEvent::AltKey,
+ (event.GetEventTime() - base::TimeTicks()).InSecondsF());
expected_event.touchesLength = 1;
- expected_event.timeStampSeconds =
- (event.GetEventTime() - base::TimeTicks()).InSecondsF();
- expected_event.modifiers = WebInputEvent::ShiftKey | WebInputEvent::AltKey;
WebTouchPoint expected_pointer;
expected_pointer.id = pointer.id;
expected_pointer.state = WebTouchPoint::StatePressed;

Powered by Google App Engine
This is Rietveld 408576698