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

Unified Diff: blimp/net/input_message_unittest.cc

Issue 1975213003: Blimp Client: add support for tap gesture events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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
« no previous file with comments | « blimp/net/input_message_generator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: blimp/net/input_message_unittest.cc
diff --git a/blimp/net/input_message_unittest.cc b/blimp/net/input_message_unittest.cc
index 4b7a2e76b3f7042e95740aee69c94a1e3093292d..8d8d0e5098d7e6ce10cdecb89c06e5d899c413a5 100644
--- a/blimp/net/input_message_unittest.cc
+++ b/blimp/net/input_message_unittest.cc
@@ -139,4 +139,35 @@ TEST(InputMessageConverterTest, TestTextInputTypeToProtoConversion) {
}
}
+TEST(InputMessageTest, TestGestureTapDownRoundTrip) {
+ blink::WebGestureEvent event = BuildBaseTestEvent();
+ event.type = blink::WebGestureEvent::Type::GestureTapDown;
+ event.data.tapDown.width = 2.3f;
+ event.data.tapDown.height = 3.4f;
+ ValidateWebGestureEventRoundTripping(event);
+}
+
+TEST(InputMessageTest, TestGestureTapCancelRoundTrip) {
+ blink::WebGestureEvent event = BuildBaseTestEvent();
+ event.type = blink::WebGestureEvent::Type::GestureTapCancel;
+ ValidateWebGestureEventRoundTripping(event);
+}
+
+TEST(InputMessageTest, TestGestureTapUnconfirmedRoundTrip) {
+ blink::WebGestureEvent event = BuildBaseTestEvent();
+ event.type = blink::WebGestureEvent::Type::GestureTapUnconfirmed;
+ event.data.tap.tapCount = 2;
+ event.data.tap.width = 2.3f;
+ event.data.tap.height = 3.4f;
+ ValidateWebGestureEventRoundTripping(event);
+}
+
+TEST(InputMessageTest, TestGestureShowPressRoundTrip) {
+ blink::WebGestureEvent event = BuildBaseTestEvent();
+ event.type = blink::WebGestureEvent::Type::GestureShowPress;
+ event.data.showPress.width = 2.3f;
+ event.data.showPress.height = 3.4f;
+ ValidateWebGestureEventRoundTripping(event);
+}
+
} // namespace blimp
« no previous file with comments | « blimp/net/input_message_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698