| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Needed on Windows to get |M_PI| from <cmath>. | 5 // Needed on Windows to get |M_PI| from <cmath>. |
| 6 #ifdef _WIN32 | 6 #ifdef _WIN32 |
| 7 #define _USE_MATH_DEFINES | 7 #define _USE_MATH_DEFINES |
| 8 #endif | 8 #endif |
| 9 | 9 |
| 10 #include <cmath> | 10 #include <cmath> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 expected_pointer.state = WebTouchPoint::StatePressed; | 46 expected_pointer.state = WebTouchPoint::StatePressed; |
| 47 expected_pointer.position = blink::WebFloatPoint(pointer.x, pointer.y); | 47 expected_pointer.position = blink::WebFloatPoint(pointer.x, pointer.y); |
| 48 expected_pointer.screenPosition = | 48 expected_pointer.screenPosition = |
| 49 blink::WebFloatPoint(pointer.raw_x, pointer.raw_y); | 49 blink::WebFloatPoint(pointer.raw_x, pointer.raw_y); |
| 50 expected_pointer.radiusX = pointer.touch_major / 2.f; | 50 expected_pointer.radiusX = pointer.touch_major / 2.f; |
| 51 expected_pointer.radiusY = pointer.touch_minor / 2.f; | 51 expected_pointer.radiusY = pointer.touch_minor / 2.f; |
| 52 expected_pointer.rotationAngle = 0.f; | 52 expected_pointer.rotationAngle = 0.f; |
| 53 expected_pointer.force = pointer.pressure; | 53 expected_pointer.force = pointer.pressure; |
| 54 expected_event.touches[0] = expected_pointer; | 54 expected_event.touches[0] = expected_pointer; |
| 55 | 55 |
| 56 WebTouchEvent actual_event = CreateWebTouchEventFromMotionEvent(event); | 56 WebTouchEvent actual_event = CreateWebTouchEventFromMotionEvent(event, false); |
| 57 EXPECT_EQ(WebInputEventTraits::ToString(expected_event), | 57 EXPECT_EQ(WebInputEventTraits::ToString(expected_event), |
| 58 WebInputEventTraits::ToString(actual_event)); | 58 WebInputEventTraits::ToString(actual_event)); |
| 59 } | 59 } |
| 60 | 60 |
| 61 } // namespace content | 61 } // namespace content |
| OLD | NEW |