| Index: content/browser/renderer_host/input/motion_event_android_unittest.cc
|
| diff --git a/content/browser/renderer_host/input/motion_event_android_unittest.cc b/content/browser/renderer_host/input/motion_event_android_unittest.cc
|
| index f1c13308f38d688b2e5bd393a9f0996523da1f1d..2ec406ff6bb61e7025ee3360bfe4bc8c9488a6c6 100644
|
| --- a/content/browser/renderer_host/input/motion_event_android_unittest.cc
|
| +++ b/content/browser/renderer_host/input/motion_event_android_unittest.cc
|
| @@ -31,13 +31,17 @@ TEST(MotionEventAndroidTest, Constructor) {
|
| int event_time_ms = 5;
|
| base::TimeTicks event_time =
|
| base::TimeTicks() + base::TimeDelta::FromMilliseconds(event_time_ms);
|
| - float x0 = 13.7;
|
| - float y0 = -7.13;
|
| - float x1 = -13.7;
|
| - float y1 = 7.13;
|
| + float x0 = 13.7f;
|
| + float y0 = -7.13f;
|
| + float x1 = -13.7f;
|
| + float y1 = 7.13f;
|
| float raw_offset = 10.1f;
|
| float touch_major0 = 5.3f;
|
| float touch_major1 = 3.5f;
|
| + float touch_minor0 = 1.2f;
|
| + float touch_minor1 = 2.1f;
|
| + float orientation0 = 0.1f;
|
| + float orientation1 = -0.1f;
|
| int p0 = 1;
|
| int p1 = 2;
|
| int pointer_count = 2;
|
| @@ -64,6 +68,10 @@ TEST(MotionEventAndroidTest, Constructor) {
|
| p1,
|
| touch_major0,
|
| touch_major1,
|
| + touch_minor0,
|
| + touch_minor1,
|
| + orientation0,
|
| + orientation1,
|
| x0 + raw_offset,
|
| y0 - raw_offset,
|
| kAndroidToolTypeFinger,
|
| @@ -82,6 +90,10 @@ TEST(MotionEventAndroidTest, Constructor) {
|
| EXPECT_FLOAT_EQ((y1 - raw_offset) * kPixToDip, event.GetRawY(1));
|
| EXPECT_EQ(touch_major0 * kPixToDip, event.GetTouchMajor(0));
|
| EXPECT_EQ(touch_major1 * kPixToDip, event.GetTouchMajor(1));
|
| + EXPECT_EQ(touch_minor0 * kPixToDip, event.GetTouchMinor(0));
|
| + EXPECT_EQ(touch_minor1 * kPixToDip, event.GetTouchMinor(1));
|
| + EXPECT_EQ(orientation0, event.GetOrientation(0));
|
| + EXPECT_EQ(orientation1, event.GetOrientation(1));
|
| EXPECT_EQ(p0, event.GetPointerId(0));
|
| EXPECT_EQ(p1, event.GetPointerId(1));
|
| EXPECT_EQ(MotionEvent::TOOL_TYPE_FINGER, event.GetToolType(0));
|
| @@ -96,9 +108,11 @@ TEST(MotionEventAndroidTest, Clone) {
|
| int event_time_ms = 5;
|
| base::TimeTicks event_time =
|
| base::TimeTicks() + base::TimeDelta::FromMilliseconds(event_time_ms);
|
| - float x = 13.7;
|
| - float y = -7.13;
|
| + float x = 13.7f;
|
| + float y = -7.13f;
|
| float touch_major = 5.3f;
|
| + float touch_minor = 3.5f;
|
| + float orientation = 0.2f;
|
| int pointer_count = 1;
|
| int pointer_id = 1;
|
| base::android::ScopedJavaLocalRef<jobject> event_obj =
|
| @@ -122,6 +136,10 @@ TEST(MotionEventAndroidTest, Clone) {
|
| 0,
|
| touch_major,
|
| 0.f,
|
| + touch_minor,
|
| + 0.f,
|
| + orientation,
|
| + 0.f,
|
| x,
|
| y,
|
| 0,
|
| @@ -137,8 +155,8 @@ TEST(MotionEventAndroidTest, Cancel) {
|
| base::TimeTicks event_time =
|
| base::TimeTicks() + base::TimeDelta::FromMilliseconds(event_time_ms);
|
| int pointer_count = 1;
|
| - float x = 13.7;
|
| - float y = -7.13;
|
| + float x = 13.7f;
|
| + float y = -7.13f;
|
| base::android::ScopedJavaLocalRef<jobject> event_obj =
|
| MotionEventAndroid::Obtain(
|
| event_time, event_time, MotionEvent::ACTION_DOWN, x, y);
|
| @@ -160,6 +178,10 @@ TEST(MotionEventAndroidTest, Cancel) {
|
| 0,
|
| 0.f,
|
| 0.f,
|
| + 0.f,
|
| + 0.f,
|
| + 0.f,
|
| + 0.f,
|
| x,
|
| y,
|
| 0,
|
|
|