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

Unified Diff: content/common/input/touch_event_stream_validator_unittest.cc

Issue 2573073003: Collapse the API surface on WebInputEvent via accessor functions. (Closed)
Patch Set: Fix nits Created 3 years, 11 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/common/input/touch_event_stream_validator_unittest.cc
diff --git a/content/common/input/touch_event_stream_validator_unittest.cc b/content/common/input/touch_event_stream_validator_unittest.cc
index b366d2092391819ee66451dc905307c1a920d19f..0384dc99fb7ff8a8adb7c861495632ecc14dc2be 100644
--- a/content/common/input/touch_event_stream_validator_unittest.cc
+++ b/content/common/input/touch_event_stream_validator_unittest.cc
@@ -122,10 +122,11 @@ TEST(TouchEventStreamValidator, EmptyEvent) {
TEST(TouchEventStreamValidator, InvalidEventType) {
TouchEventStreamValidator validator;
- WebTouchEvent event;
+ WebTouchEvent event(WebInputEvent::GestureScrollBegin,
+ WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
std::string error_msg;
- event.type = WebInputEvent::GestureScrollBegin;
event.touchesLength = 1;
event.touches[0].state = WebTouchPoint::StatePressed;
@@ -154,9 +155,9 @@ TEST(TouchEventStreamValidator, InvalidPointStates) {
EXPECT_TRUE(validator.Validate(start, &error_msg));
EXPECT_TRUE(error_msg.empty());
- WebTouchEvent event;
+ WebTouchEvent event(kTouchTypes[i], WebInputEvent::NoModifiers,
+ WebInputEvent::TimeStampForTesting);
event.touchesLength = 1;
- event.type = kTouchTypes[i];
for (size_t j = WebTouchPoint::StateUndefined;
j <= WebTouchPoint::StateCancelled;
++j) {
« no previous file with comments | « content/common/input/touch_event_stream_validator.cc ('k') | content/common/input/web_touch_event_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698