| 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 <stddef.h> | 10 #include <stddef.h> |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 pos.y(), | 104 pos.y(), |
| 105 raw_pos.x(), | 105 raw_pos.x(), |
| 106 raw_pos.y(), | 106 raw_pos.y(), |
| 107 touch_points, | 107 touch_points, |
| 108 rect, | 108 rect, |
| 109 flags, | 109 flags, |
| 110 0U); | 110 0U); |
| 111 | 111 |
| 112 blink::WebGestureEvent web_event = | 112 blink::WebGestureEvent web_event = |
| 113 ui::CreateWebGestureEventFromGestureEventData(event); | 113 ui::CreateWebGestureEventFromGestureEventData(event); |
| 114 EXPECT_EQ(WebInputEvent::GestureScrollUpdate, web_event.type); | 114 EXPECT_EQ(WebInputEvent::GestureScrollUpdate, web_event.type()); |
| 115 EXPECT_EQ(0, web_event.modifiers); | 115 EXPECT_EQ(0, web_event.modifiers()); |
| 116 EXPECT_EQ((timestamp - base::TimeTicks()).InSecondsF(), | 116 EXPECT_EQ((timestamp - base::TimeTicks()).InSecondsF(), |
| 117 web_event.timeStampSeconds); | 117 web_event.timeStampSeconds()); |
| 118 EXPECT_EQ(gfx::ToFlooredInt(pos.x()), web_event.x); | 118 EXPECT_EQ(gfx::ToFlooredInt(pos.x()), web_event.x); |
| 119 EXPECT_EQ(gfx::ToFlooredInt(pos.y()), web_event.y); | 119 EXPECT_EQ(gfx::ToFlooredInt(pos.y()), web_event.y); |
| 120 EXPECT_EQ(gfx::ToFlooredInt(raw_pos.x()), web_event.globalX); | 120 EXPECT_EQ(gfx::ToFlooredInt(raw_pos.x()), web_event.globalX); |
| 121 EXPECT_EQ(gfx::ToFlooredInt(raw_pos.y()), web_event.globalY); | 121 EXPECT_EQ(gfx::ToFlooredInt(raw_pos.y()), web_event.globalY); |
| 122 EXPECT_EQ(blink::WebGestureDeviceTouchscreen, web_event.sourceDevice); | 122 EXPECT_EQ(blink::WebGestureDeviceTouchscreen, web_event.sourceDevice); |
| 123 EXPECT_EQ(delta.x(), web_event.data.scrollUpdate.deltaX); | 123 EXPECT_EQ(delta.x(), web_event.data.scrollUpdate.deltaX); |
| 124 EXPECT_EQ(delta.y(), web_event.data.scrollUpdate.deltaY); | 124 EXPECT_EQ(delta.y(), web_event.data.scrollUpdate.deltaY); |
| 125 EXPECT_TRUE(web_event.data.scrollUpdate.previousUpdateInSequencePrevented); | 125 EXPECT_TRUE(web_event.data.scrollUpdate.previousUpdateInSequencePrevented); |
| 126 } | 126 } |
| 127 | 127 |
| 128 } // namespace content | 128 } // namespace content |
| OLD | NEW |