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

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

Issue 514303002: Revert "ozone: evdev: Use tracking id for TouchEvent finger id" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 f673f48e6e322be93cefa156e52586fa624a962f..72c1d3dd6a862dc7359b2504e54c7b76d513e4d5 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(684, event->touch_id());
+ EXPECT_EQ(0, event->touch_id());
EXPECT_FLOAT_EQ(1.5f, event->radius_x());
EXPECT_FLOAT_EQ(.5f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
@@ -227,7 +227,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(684, event->touch_id());
+ EXPECT_EQ(0, event->touch_id());
EXPECT_FLOAT_EQ(2.f / 3.f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
@@ -241,7 +241,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(684, event->touch_id());
+ EXPECT_EQ(0, event->touch_id());
EXPECT_FLOAT_EQ(2.f / 3.f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
}
@@ -278,7 +278,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(684, event->touch_id());
+ EXPECT_EQ(0, event->touch_id());
EXPECT_FLOAT_EQ(.5f, event->force());
EXPECT_FLOAT_EQ(0.f, event->rotation_angle());
}
@@ -329,7 +329,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(684, ev0->touch_id());
+ EXPECT_EQ(0, ev0->touch_id());
EXPECT_FLOAT_EQ(.5f, ev0->force());
EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
@@ -338,7 +338,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(686, ev1->touch_id());
+ EXPECT_EQ(1, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
@@ -355,7 +355,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(686, ev1->touch_id());
+ EXPECT_EQ(1, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
@@ -374,7 +374,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(684, ev0->touch_id());
+ EXPECT_EQ(0, ev0->touch_id());
EXPECT_FLOAT_EQ(.5f, ev0->force());
EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
@@ -393,7 +393,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(684, ev0->touch_id());
+ EXPECT_EQ(0, ev0->touch_id());
EXPECT_FLOAT_EQ(.5f, ev0->force());
EXPECT_FLOAT_EQ(0.f, ev0->rotation_angle());
@@ -401,7 +401,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(686, ev1->touch_id());
+ EXPECT_EQ(1, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
@@ -418,7 +418,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(686, ev1->touch_id());
+ EXPECT_EQ(1, ev1->touch_id());
EXPECT_FLOAT_EQ(.5f, ev1->force());
EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle());
}
@@ -515,12 +515,12 @@ TEST_F(TouchEventConverterEvdevTest,
ui::TouchEvent* ev0 = dev->event(0);
ui::TouchEvent* ev1 = dev->event(1);
- EXPECT_EQ(100, ev0->touch_id());
+ EXPECT_EQ(0, ev0->touch_id());
EXPECT_EQ(999, ev0->x());
EXPECT_EQ(888, ev0->y());
EXPECT_FLOAT_EQ(0.8333333f, ev0->force());
- EXPECT_EQ(200, ev1->touch_id());
+ EXPECT_EQ(1, 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