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

Unified Diff: ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc

Issue 512553002: ozone: evdev: Use tracking id for TouchEvent finger id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add/fix tests Created 6 years, 4 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 | « ui/events/ozone/evdev/touch_event_converter_evdev.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
index a8ce25f1523673bd7c92c062a39592822733c2a0..8547f2a1e99c228112e67e766d76d6b2025dc2f5 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
@@ -179,7 +179,7 @@ TEST_F(TouchEventConverterEvdevTest, TouchDown) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
EXPECT_EQ(42, event->x());
EXPECT_EQ(51, event->y());
- EXPECT_EQ(0, event->touch_id());
+ EXPECT_EQ(684, event->touch_id());
EXPECT_FLOAT_EQ(.5f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
}
@@ -226,7 +226,7 @@ TEST_F(TouchEventConverterEvdevTest, TouchMove) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
EXPECT_EQ(42, event->x());
EXPECT_EQ(43, event->y());
- EXPECT_EQ(0, event->touch_id());
+ EXPECT_EQ(684, event->touch_id());
EXPECT_FLOAT_EQ(2.f / 3.f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
@@ -240,7 +240,7 @@ TEST_F(TouchEventConverterEvdevTest, TouchMove) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
EXPECT_EQ(42, event->x());
EXPECT_EQ(42, event->y());
- EXPECT_EQ(0, event->touch_id());
+ EXPECT_EQ(684, event->touch_id());
EXPECT_FLOAT_EQ(2.f / 3.f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
}
@@ -277,7 +277,7 @@ TEST_F(TouchEventConverterEvdevTest, TouchRelease) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), event->time_stamp());
EXPECT_EQ(42, event->x());
EXPECT_EQ(51, event->y());
- EXPECT_EQ(0, event->touch_id());
+ EXPECT_EQ(684, event->touch_id());
EXPECT_FLOAT_EQ(.5f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
}
@@ -328,7 +328,7 @@ TEST_F(TouchEventConverterEvdevTest, TwoFingerGesture) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev0->time_stamp());
EXPECT_EQ(40, ev0->x());
EXPECT_EQ(51, ev0->y());
- EXPECT_EQ(0, ev0->touch_id());
+ EXPECT_EQ(684, ev0->touch_id());
EXPECT_FLOAT_EQ(.5f, ev0->force());
EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
@@ -337,7 +337,7 @@ TEST_F(TouchEventConverterEvdevTest, TwoFingerGesture) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
EXPECT_EQ(101, ev1->x());
EXPECT_EQ(102, ev1->y());
- EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_EQ(686, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
@@ -354,7 +354,7 @@ TEST_F(TouchEventConverterEvdevTest, TwoFingerGesture) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
EXPECT_EQ(40, ev1->x());
EXPECT_EQ(102, ev1->y());
- EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_EQ(686, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
@@ -373,7 +373,7 @@ TEST_F(TouchEventConverterEvdevTest, TwoFingerGesture) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev0->time_stamp());
EXPECT_EQ(39, ev0->x());
EXPECT_EQ(51, ev0->y());
- EXPECT_EQ(0, ev0->touch_id());
+ EXPECT_EQ(684, ev0->touch_id());
EXPECT_FLOAT_EQ(.5f, ev0->force());
EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
@@ -392,7 +392,7 @@ TEST_F(TouchEventConverterEvdevTest, TwoFingerGesture) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev0->time_stamp());
EXPECT_EQ(39, ev0->x());
EXPECT_EQ(51, ev0->y());
- EXPECT_EQ(0, ev0->touch_id());
+ EXPECT_EQ(684, ev0->touch_id());
EXPECT_FLOAT_EQ(.5f, ev0->force());
EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
@@ -400,7 +400,7 @@ TEST_F(TouchEventConverterEvdevTest, TwoFingerGesture) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
EXPECT_EQ(38, ev1->x());
EXPECT_EQ(102, ev1->y());
- EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_EQ(686, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
@@ -417,7 +417,7 @@ TEST_F(TouchEventConverterEvdevTest, TwoFingerGesture) {
EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp());
EXPECT_EQ(38, ev1->x());
EXPECT_EQ(102, ev1->y());
- EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_EQ(686, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
}
@@ -514,12 +514,12 @@ TEST_F(TouchEventConverterEvdevTest,
ui::TouchEvent* ev0 = dev->event(0);
ui::TouchEvent* ev1 = dev->event(1);
- EXPECT_EQ(0, ev0->touch_id());
+ EXPECT_EQ(100, ev0->touch_id());
EXPECT_EQ(999, ev0->x());
EXPECT_EQ(888, ev0->y());
EXPECT_FLOAT_EQ(0.8333333f, ev0->force());
- EXPECT_EQ(1, ev1->touch_id());
+ EXPECT_EQ(200, ev1->touch_id());
EXPECT_EQ(777, ev1->x());
EXPECT_EQ(666, ev1->y());
EXPECT_FLOAT_EQ(0.4666666f, ev1->force());
« no previous file with comments | « ui/events/ozone/evdev/touch_event_converter_evdev.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698