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

Unified Diff: ui/events/gestures/motion_event_aura_unittest.cc

Issue 1147083005: Separate motion event touch geometry orientation from stylus orientation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Aura Created 5 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 | « ui/events/gestures/motion_event_aura.cc ('k') | ui/events/test/motion_event_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/motion_event_aura_unittest.cc
diff --git a/ui/events/gestures/motion_event_aura_unittest.cc b/ui/events/gestures/motion_event_aura_unittest.cc
index 03a8dd7fff12e6c33e151fd09ea5d2d136a0a902..26884b367b1379c9844edec90a57c1606e9456f2 100644
--- a/ui/events/gestures/motion_event_aura_unittest.cc
+++ b/ui/events/gestures/motion_event_aura_unittest.cc
@@ -266,7 +266,8 @@ TEST(MotionEventAuraTest, TapParams) {
EXPECT_EQ(1U, event.GetPointerCount());
EXPECT_FLOAT_EQ(radius_x, event.GetTouchMajor(0) / 2);
EXPECT_FLOAT_EQ(radius_y, event.GetTouchMinor(0) / 2);
- EXPECT_FLOAT_EQ(rotation_angle, event.GetOrientation(0) * 180 / M_PI + 90);
+ EXPECT_FLOAT_EQ(rotation_angle,
+ event.GetTouchOrientation(0) * 180 / M_PI + 90);
EXPECT_FLOAT_EQ(pressure, event.GetPressure(0));
// Test case: radius_x < radius_y, rotation_angle < 90
@@ -281,7 +282,7 @@ TEST(MotionEventAuraTest, TapParams) {
EXPECT_EQ(2U, event.GetPointerCount());
EXPECT_FLOAT_EQ(radius_y, event.GetTouchMajor(1) / 2);
EXPECT_FLOAT_EQ(radius_x, event.GetTouchMinor(1) / 2);
- EXPECT_FLOAT_EQ(rotation_angle, event.GetOrientation(1) * 180 / M_PI);
+ EXPECT_FLOAT_EQ(rotation_angle, event.GetTouchOrientation(1) * 180 / M_PI);
EXPECT_FLOAT_EQ(pressure, event.GetPressure(1));
// Test cloning of tap params
@@ -292,7 +293,7 @@ TEST(MotionEventAuraTest, TapParams) {
EXPECT_EQ(2U, clone->GetPointerCount());
EXPECT_FLOAT_EQ(radius_y, clone->GetTouchMajor(1) / 2);
EXPECT_FLOAT_EQ(radius_x, clone->GetTouchMinor(1) / 2);
- EXPECT_FLOAT_EQ(rotation_angle, clone->GetOrientation(1) * 180 / M_PI);
+ EXPECT_FLOAT_EQ(rotation_angle, clone->GetTouchOrientation(1) * 180 / M_PI);
EXPECT_FLOAT_EQ(pressure, clone->GetPressure(1));
// TODO(mustaq): The move test seems out-of-scope here, crbug.com/450655
@@ -308,7 +309,7 @@ TEST(MotionEventAuraTest, TapParams) {
EXPECT_EQ(2U, event.GetPointerCount());
EXPECT_FLOAT_EQ(radius_y, event.GetTouchMajor(1) / 2);
EXPECT_FLOAT_EQ(radius_x, event.GetTouchMinor(1) / 2);
- EXPECT_FLOAT_EQ(rotation_angle, event.GetOrientation(1) * 180 / M_PI);
+ EXPECT_FLOAT_EQ(rotation_angle, event.GetTouchOrientation(1) * 180 / M_PI);
EXPECT_FLOAT_EQ(pressure, event.GetPressure(1));
// Test case: radius_x > radius_y, rotation_angle > 90
@@ -323,7 +324,8 @@ TEST(MotionEventAuraTest, TapParams) {
EXPECT_EQ(3U, event.GetPointerCount());
EXPECT_FLOAT_EQ(radius_x, event.GetTouchMajor(2) / 2);
EXPECT_FLOAT_EQ(radius_y, event.GetTouchMinor(2) / 2);
- EXPECT_FLOAT_EQ(rotation_angle, event.GetOrientation(2) * 180 / M_PI + 90);
+ EXPECT_FLOAT_EQ(rotation_angle,
+ event.GetTouchOrientation(2) * 180 / M_PI + 90);
EXPECT_FLOAT_EQ(pressure, event.GetPressure(2));
// Test case: radius_x < radius_y, rotation_angle > 90
@@ -338,7 +340,8 @@ TEST(MotionEventAuraTest, TapParams) {
EXPECT_EQ(4U, event.GetPointerCount());
EXPECT_FLOAT_EQ(radius_y, event.GetTouchMajor(3) / 2);
EXPECT_FLOAT_EQ(radius_x, event.GetTouchMinor(3) / 2);
- EXPECT_FLOAT_EQ(rotation_angle, event.GetOrientation(3) * 180 / M_PI + 180);
+ EXPECT_FLOAT_EQ(rotation_angle,
+ event.GetTouchOrientation(3) * 180 / M_PI + 180);
EXPECT_FLOAT_EQ(pressure, event.GetPressure(3));
}
« no previous file with comments | « ui/events/gestures/motion_event_aura.cc ('k') | ui/events/test/motion_event_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698