| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 KeyboardEventInit keyEventInit; | 59 KeyboardEventInit keyEventInit; |
| 60 keyEventInit.setBubbles(true); | 60 keyEventInit.setBubbles(true); |
| 61 keyEventInit.setCancelable(true); | 61 keyEventInit.setCancelable(true); |
| 62 keyEventInit.setLocation(location); | 62 keyEventInit.setLocation(location); |
| 63 return new KeyboardEvent("keydown", keyEventInit); | 63 return new KeyboardEvent("keydown", keyEventInit); |
| 64 } | 64 } |
| 65 | 65 |
| 66 int getModifiersForKeyLocationCode(KeyboardEvent::KeyLocationCode location) { | 66 int getModifiersForKeyLocationCode(KeyboardEvent::KeyLocationCode location) { |
| 67 KeyboardEvent* event = createKeyboardEventWithLocation(location); | 67 KeyboardEvent* event = createKeyboardEventWithLocation(location); |
| 68 WebKeyboardEventBuilder convertedEvent(*event); | 68 WebKeyboardEventBuilder convertedEvent(*event); |
| 69 return convertedEvent.modifiers; | 69 return convertedEvent.modifiers(); |
| 70 } | 70 } |
| 71 | 71 |
| 72 TEST(WebInputEventConversionTest, WebKeyboardEventBuilder) { | 72 TEST(WebInputEventConversionTest, WebKeyboardEventBuilder) { |
| 73 // Test key location conversion. | 73 // Test key location conversion. |
| 74 int modifiers = | 74 int modifiers = |
| 75 getModifiersForKeyLocationCode(KeyboardEvent::kDomKeyLocationStandard); | 75 getModifiersForKeyLocationCode(KeyboardEvent::kDomKeyLocationStandard); |
| 76 EXPECT_FALSE(modifiers & WebInputEvent::IsKeyPad || | 76 EXPECT_FALSE(modifiers & WebInputEvent::IsKeyPad || |
| 77 modifiers & WebInputEvent::IsLeft || | 77 modifiers & WebInputEvent::IsLeft || |
| 78 modifiers & WebInputEvent::IsRight); | 78 modifiers & WebInputEvent::IsRight); |
| 79 | 79 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 92 modifiers = | 92 modifiers = |
| 93 getModifiersForKeyLocationCode(KeyboardEvent::kDomKeyLocationNumpad); | 93 getModifiersForKeyLocationCode(KeyboardEvent::kDomKeyLocationNumpad); |
| 94 EXPECT_TRUE(modifiers & WebInputEvent::IsKeyPad); | 94 EXPECT_TRUE(modifiers & WebInputEvent::IsKeyPad); |
| 95 EXPECT_FALSE(modifiers & WebInputEvent::IsLeft || | 95 EXPECT_FALSE(modifiers & WebInputEvent::IsLeft || |
| 96 modifiers & WebInputEvent::IsRight); | 96 modifiers & WebInputEvent::IsRight); |
| 97 } | 97 } |
| 98 | 98 |
| 99 TEST(WebInputEventConversionTest, WebMouseEventBuilder) { | 99 TEST(WebInputEventConversionTest, WebMouseEventBuilder) { |
| 100 TouchEvent* event = TouchEvent::create(); | 100 TouchEvent* event = TouchEvent::create(); |
| 101 WebMouseEventBuilder mouse(0, 0, *event); | 101 WebMouseEventBuilder mouse(0, 0, *event); |
| 102 EXPECT_EQ(WebInputEvent::Undefined, mouse.type); | 102 EXPECT_EQ(WebInputEvent::Undefined, mouse.type()); |
| 103 } | 103 } |
| 104 | 104 |
| 105 TEST(WebInputEventConversionTest, WebTouchEventBuilder) { | 105 TEST(WebInputEventConversionTest, WebTouchEventBuilder) { |
| 106 const std::string baseURL("http://www.test0.com/"); | 106 const std::string baseURL("http://www.test0.com/"); |
| 107 const std::string fileName("fixed_layout.html"); | 107 const std::string fileName("fixed_layout.html"); |
| 108 | 108 |
| 109 URLTestHelpers::registerMockedURLFromBaseURL( | 109 URLTestHelpers::registerMockedURLFromBaseURL( |
| 110 WebString::fromUTF8(baseURL.c_str()), | 110 WebString::fromUTF8(baseURL.c_str()), |
| 111 WebString::fromUTF8("fixed_layout.html")); | 111 WebString::fromUTF8("fixed_layout.html")); |
| 112 FrameTestHelpers::WebViewHelper webViewHelper; | 112 FrameTestHelpers::WebViewHelper webViewHelper; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 { | 147 { |
| 148 TouchList* touchList = TouchList::create(); | 148 TouchList* touchList = TouchList::create(); |
| 149 touchList->append(touch0); | 149 touchList->append(touch0); |
| 150 TouchEvent* touchEvent = TouchEvent::create( | 150 TouchEvent* touchEvent = TouchEvent::create( |
| 151 touchList, touchList, touchList, EventTypeNames::touchstart, domWindow, | 151 touchList, touchList, touchList, EventTypeNames::touchstart, domWindow, |
| 152 PlatformEvent::NoModifiers, false, false, true, 0, TouchActionAuto, | 152 PlatformEvent::NoModifiers, false, false, true, 0, TouchActionAuto, |
| 153 WebPointerProperties::PointerType::Touch); | 153 WebPointerProperties::PointerType::Touch); |
| 154 | 154 |
| 155 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); | 155 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); |
| 156 ASSERT_EQ(1u, webTouchBuilder.touchesLength); | 156 ASSERT_EQ(1u, webTouchBuilder.touchesLength); |
| 157 EXPECT_EQ(WebInputEvent::TouchStart, webTouchBuilder.type); | 157 EXPECT_EQ(WebInputEvent::TouchStart, webTouchBuilder.type()); |
| 158 EXPECT_EQ(WebTouchPoint::StatePressed, webTouchBuilder.touches[0].state); | 158 EXPECT_EQ(WebTouchPoint::StatePressed, webTouchBuilder.touches[0].state); |
| 159 EXPECT_FLOAT_EQ(p0.screenPosition.x, | 159 EXPECT_FLOAT_EQ(p0.screenPosition.x, |
| 160 webTouchBuilder.touches[0].screenPosition.x); | 160 webTouchBuilder.touches[0].screenPosition.x); |
| 161 EXPECT_FLOAT_EQ(p0.screenPosition.y, | 161 EXPECT_FLOAT_EQ(p0.screenPosition.y, |
| 162 webTouchBuilder.touches[0].screenPosition.y); | 162 webTouchBuilder.touches[0].screenPosition.y); |
| 163 EXPECT_FLOAT_EQ(p0.position.x, webTouchBuilder.touches[0].position.x); | 163 EXPECT_FLOAT_EQ(p0.position.x, webTouchBuilder.touches[0].position.x); |
| 164 EXPECT_FLOAT_EQ(p0.position.y, webTouchBuilder.touches[0].position.y); | 164 EXPECT_FLOAT_EQ(p0.position.y, webTouchBuilder.touches[0].position.y); |
| 165 EXPECT_FLOAT_EQ(p0.radiusX, webTouchBuilder.touches[0].radiusX); | 165 EXPECT_FLOAT_EQ(p0.radiusX, webTouchBuilder.touches[0].radiusX); |
| 166 EXPECT_FLOAT_EQ(p0.radiusY, webTouchBuilder.touches[0].radiusY); | 166 EXPECT_FLOAT_EQ(p0.radiusY, webTouchBuilder.touches[0].radiusY); |
| 167 EXPECT_FLOAT_EQ(p0.rotationAngle, webTouchBuilder.touches[0].rotationAngle); | 167 EXPECT_FLOAT_EQ(p0.rotationAngle, webTouchBuilder.touches[0].rotationAngle); |
| (...skipping 24 matching lines...) Expand all Loading... |
| 192 activeTouchList->append(touch1); | 192 activeTouchList->append(touch1); |
| 193 movedTouchList->append(touch0); | 193 movedTouchList->append(touch0); |
| 194 TouchEvent* touchEvent = TouchEvent::create( | 194 TouchEvent* touchEvent = TouchEvent::create( |
| 195 activeTouchList, activeTouchList, movedTouchList, | 195 activeTouchList, activeTouchList, movedTouchList, |
| 196 EventTypeNames::touchmove, domWindow, PlatformEvent::NoModifiers, false, | 196 EventTypeNames::touchmove, domWindow, PlatformEvent::NoModifiers, false, |
| 197 false, true, 0, TouchActionAuto, | 197 false, true, 0, TouchActionAuto, |
| 198 WebPointerProperties::PointerType::Touch); | 198 WebPointerProperties::PointerType::Touch); |
| 199 | 199 |
| 200 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); | 200 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); |
| 201 ASSERT_EQ(2u, webTouchBuilder.touchesLength); | 201 ASSERT_EQ(2u, webTouchBuilder.touchesLength); |
| 202 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type); | 202 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type()); |
| 203 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[0].state); | 203 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[0].state); |
| 204 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[1].state); | 204 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[1].state); |
| 205 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); | 205 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); |
| 206 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); | 206 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); |
| 207 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); | 207 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); |
| 208 } | 208 } |
| 209 | 209 |
| 210 // Test touchmove, different point yields same ordering. | 210 // Test touchmove, different point yields same ordering. |
| 211 { | 211 { |
| 212 TouchList* activeTouchList = TouchList::create(); | 212 TouchList* activeTouchList = TouchList::create(); |
| 213 TouchList* movedTouchList = TouchList::create(); | 213 TouchList* movedTouchList = TouchList::create(); |
| 214 activeTouchList->append(touch0); | 214 activeTouchList->append(touch0); |
| 215 activeTouchList->append(touch1); | 215 activeTouchList->append(touch1); |
| 216 movedTouchList->append(touch1); | 216 movedTouchList->append(touch1); |
| 217 TouchEvent* touchEvent = TouchEvent::create( | 217 TouchEvent* touchEvent = TouchEvent::create( |
| 218 activeTouchList, activeTouchList, movedTouchList, | 218 activeTouchList, activeTouchList, movedTouchList, |
| 219 EventTypeNames::touchmove, domWindow, PlatformEvent::NoModifiers, false, | 219 EventTypeNames::touchmove, domWindow, PlatformEvent::NoModifiers, false, |
| 220 false, true, 0, TouchActionAuto, | 220 false, true, 0, TouchActionAuto, |
| 221 WebPointerProperties::PointerType::Touch); | 221 WebPointerProperties::PointerType::Touch); |
| 222 | 222 |
| 223 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); | 223 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); |
| 224 ASSERT_EQ(2u, webTouchBuilder.touchesLength); | 224 ASSERT_EQ(2u, webTouchBuilder.touchesLength); |
| 225 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type); | 225 EXPECT_EQ(WebInputEvent::TouchMove, webTouchBuilder.type()); |
| 226 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].state); | 226 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].state); |
| 227 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[1].state); | 227 EXPECT_EQ(WebTouchPoint::StateMoved, webTouchBuilder.touches[1].state); |
| 228 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); | 228 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); |
| 229 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); | 229 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); |
| 230 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); | 230 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); |
| 231 } | 231 } |
| 232 | 232 |
| 233 // Test touchend. | 233 // Test touchend. |
| 234 { | 234 { |
| 235 TouchList* activeTouchList = TouchList::create(); | 235 TouchList* activeTouchList = TouchList::create(); |
| 236 TouchList* releasedTouchList = TouchList::create(); | 236 TouchList* releasedTouchList = TouchList::create(); |
| 237 activeTouchList->append(touch0); | 237 activeTouchList->append(touch0); |
| 238 releasedTouchList->append(touch1); | 238 releasedTouchList->append(touch1); |
| 239 TouchEvent* touchEvent = TouchEvent::create( | 239 TouchEvent* touchEvent = TouchEvent::create( |
| 240 activeTouchList, activeTouchList, releasedTouchList, | 240 activeTouchList, activeTouchList, releasedTouchList, |
| 241 EventTypeNames::touchend, domWindow, PlatformEvent::NoModifiers, false, | 241 EventTypeNames::touchend, domWindow, PlatformEvent::NoModifiers, false, |
| 242 false, false, 0, TouchActionAuto, | 242 false, false, 0, TouchActionAuto, |
| 243 WebPointerProperties::PointerType::Touch); | 243 WebPointerProperties::PointerType::Touch); |
| 244 | 244 |
| 245 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); | 245 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); |
| 246 ASSERT_EQ(2u, webTouchBuilder.touchesLength); | 246 ASSERT_EQ(2u, webTouchBuilder.touchesLength); |
| 247 EXPECT_EQ(WebInputEvent::TouchEnd, webTouchBuilder.type); | 247 EXPECT_EQ(WebInputEvent::TouchEnd, webTouchBuilder.type()); |
| 248 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].state); | 248 EXPECT_EQ(WebTouchPoint::StateStationary, webTouchBuilder.touches[0].state); |
| 249 EXPECT_EQ(WebTouchPoint::StateReleased, webTouchBuilder.touches[1].state); | 249 EXPECT_EQ(WebTouchPoint::StateReleased, webTouchBuilder.touches[1].state); |
| 250 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); | 250 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); |
| 251 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); | 251 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); |
| 252 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); | 252 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); |
| 253 } | 253 } |
| 254 | 254 |
| 255 // Test touchcancel. | 255 // Test touchcancel. |
| 256 { | 256 { |
| 257 TouchList* activeTouchList = TouchList::create(); | 257 TouchList* activeTouchList = TouchList::create(); |
| 258 TouchList* cancelledTouchList = TouchList::create(); | 258 TouchList* cancelledTouchList = TouchList::create(); |
| 259 cancelledTouchList->append(touch0); | 259 cancelledTouchList->append(touch0); |
| 260 cancelledTouchList->append(touch1); | 260 cancelledTouchList->append(touch1); |
| 261 TouchEvent* touchEvent = TouchEvent::create( | 261 TouchEvent* touchEvent = TouchEvent::create( |
| 262 activeTouchList, activeTouchList, cancelledTouchList, | 262 activeTouchList, activeTouchList, cancelledTouchList, |
| 263 EventTypeNames::touchcancel, domWindow, PlatformEvent::NoModifiers, | 263 EventTypeNames::touchcancel, domWindow, PlatformEvent::NoModifiers, |
| 264 false, false, false, 0, TouchActionAuto, | 264 false, false, false, 0, TouchActionAuto, |
| 265 WebPointerProperties::PointerType::Touch); | 265 WebPointerProperties::PointerType::Touch); |
| 266 | 266 |
| 267 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); | 267 WebTouchEventBuilder webTouchBuilder(documentLayoutView, *touchEvent); |
| 268 ASSERT_EQ(2u, webTouchBuilder.touchesLength); | 268 ASSERT_EQ(2u, webTouchBuilder.touchesLength); |
| 269 EXPECT_EQ(WebInputEvent::TouchCancel, webTouchBuilder.type); | 269 EXPECT_EQ(WebInputEvent::TouchCancel, webTouchBuilder.type()); |
| 270 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[0].state); | 270 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[0].state); |
| 271 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[1].state); | 271 EXPECT_EQ(WebTouchPoint::StateCancelled, webTouchBuilder.touches[1].state); |
| 272 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); | 272 EXPECT_EQ(p0.id, webTouchBuilder.touches[0].id); |
| 273 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); | 273 EXPECT_EQ(p1.id, webTouchBuilder.touches[1].id); |
| 274 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); | 274 EXPECT_EQ(WebInputEvent::EventNonBlocking, webTouchBuilder.dispatchType); |
| 275 } | 275 } |
| 276 | 276 |
| 277 // Test max point limit. | 277 // Test max point limit. |
| 278 { | 278 { |
| 279 TouchList* touchList = TouchList::create(); | 279 TouchList* touchList = TouchList::create(); |
| (...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 EXPECT_EQ(10.f, platformGestureBuilder.position().x()); | 881 EXPECT_EQ(10.f, platformGestureBuilder.position().x()); |
| 882 EXPECT_EQ(10.f, platformGestureBuilder.position().y()); | 882 EXPECT_EQ(10.f, platformGestureBuilder.position().y()); |
| 883 EXPECT_EQ(10.f, platformGestureBuilder.globalPosition().x()); | 883 EXPECT_EQ(10.f, platformGestureBuilder.globalPosition().x()); |
| 884 EXPECT_EQ(10.f, platformGestureBuilder.globalPosition().y()); | 884 EXPECT_EQ(10.f, platformGestureBuilder.globalPosition().y()); |
| 885 EXPECT_EQ(1, platformGestureBuilder.tapCount()); | 885 EXPECT_EQ(1, platformGestureBuilder.tapCount()); |
| 886 | 886 |
| 887 GestureEvent* coreGestureEvent = | 887 GestureEvent* coreGestureEvent = |
| 888 GestureEvent::create(domWindow, platformGestureBuilder); | 888 GestureEvent::create(domWindow, platformGestureBuilder); |
| 889 WebGestureEventBuilder recreatedWebGestureEvent(documentLayoutView, | 889 WebGestureEventBuilder recreatedWebGestureEvent(documentLayoutView, |
| 890 *coreGestureEvent); | 890 *coreGestureEvent); |
| 891 EXPECT_EQ(webGestureEvent.type, recreatedWebGestureEvent.type); | 891 EXPECT_EQ(webGestureEvent.type(), recreatedWebGestureEvent.type()); |
| 892 EXPECT_EQ(webGestureEvent.x, recreatedWebGestureEvent.x); | 892 EXPECT_EQ(webGestureEvent.x, recreatedWebGestureEvent.x); |
| 893 EXPECT_EQ(webGestureEvent.y, recreatedWebGestureEvent.y); | 893 EXPECT_EQ(webGestureEvent.y, recreatedWebGestureEvent.y); |
| 894 EXPECT_EQ(webGestureEvent.globalX, recreatedWebGestureEvent.globalX); | 894 EXPECT_EQ(webGestureEvent.globalX, recreatedWebGestureEvent.globalX); |
| 895 EXPECT_EQ(webGestureEvent.globalY, recreatedWebGestureEvent.globalY); | 895 EXPECT_EQ(webGestureEvent.globalY, recreatedWebGestureEvent.globalY); |
| 896 EXPECT_EQ(webGestureEvent.data.tap.tapCount, | 896 EXPECT_EQ(webGestureEvent.data.tap.tapCount, |
| 897 recreatedWebGestureEvent.data.tap.tapCount); | 897 recreatedWebGestureEvent.data.tap.tapCount); |
| 898 } | 898 } |
| 899 } | 899 } |
| 900 | 900 |
| 901 TEST(WebInputEventConversionTest, VisualViewportOffset) { | 901 TEST(WebInputEventConversionTest, VisualViewportOffset) { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1151 document->layoutViewItem(), *event); | 1151 document->layoutViewItem(), *event); |
| 1152 EXPECT_EQ(1, webMouseWheel.wheelTicksX); | 1152 EXPECT_EQ(1, webMouseWheel.wheelTicksX); |
| 1153 EXPECT_EQ(3, webMouseWheel.wheelTicksY); | 1153 EXPECT_EQ(3, webMouseWheel.wheelTicksY); |
| 1154 EXPECT_EQ(5, webMouseWheel.deltaX); | 1154 EXPECT_EQ(5, webMouseWheel.deltaX); |
| 1155 EXPECT_EQ(10, webMouseWheel.deltaY); | 1155 EXPECT_EQ(10, webMouseWheel.deltaY); |
| 1156 EXPECT_EQ(2, webMouseWheel.globalX); | 1156 EXPECT_EQ(2, webMouseWheel.globalX); |
| 1157 EXPECT_EQ(6, webMouseWheel.globalY); | 1157 EXPECT_EQ(6, webMouseWheel.globalY); |
| 1158 EXPECT_EQ(10, webMouseWheel.windowX); | 1158 EXPECT_EQ(10, webMouseWheel.windowX); |
| 1159 EXPECT_EQ(30, webMouseWheel.windowY); | 1159 EXPECT_EQ(30, webMouseWheel.windowY); |
| 1160 EXPECT_TRUE(webMouseWheel.scrollByPage); | 1160 EXPECT_TRUE(webMouseWheel.scrollByPage); |
| 1161 EXPECT_EQ(WebInputEvent::ControlKey, webMouseWheel.modifiers); | 1161 EXPECT_EQ(WebInputEvent::ControlKey, webMouseWheel.modifiers()); |
| 1162 EXPECT_EQ(WebInputEvent::RailsModeHorizontal, webMouseWheel.railsMode); | 1162 EXPECT_EQ(WebInputEvent::RailsModeHorizontal, webMouseWheel.railsMode); |
| 1163 EXPECT_TRUE(webMouseWheel.hasPreciseScrollingDeltas); | 1163 EXPECT_TRUE(webMouseWheel.hasPreciseScrollingDeltas); |
| 1164 EXPECT_EQ(WebInputEvent::Blocking, webMouseWheel.dispatchType); | 1164 EXPECT_EQ(WebInputEvent::Blocking, webMouseWheel.dispatchType); |
| 1165 #if OS(MACOSX) | 1165 #if OS(MACOSX) |
| 1166 EXPECT_EQ(WebMouseWheelEvent::PhaseBegan, webMouseWheel.phase); | 1166 EXPECT_EQ(WebMouseWheelEvent::PhaseBegan, webMouseWheel.phase); |
| 1167 EXPECT_EQ(WebMouseWheelEvent::PhaseChanged, webMouseWheel.momentumPhase); | 1167 EXPECT_EQ(WebMouseWheelEvent::PhaseChanged, webMouseWheel.momentumPhase); |
| 1168 #endif | 1168 #endif |
| 1169 } | 1169 } |
| 1170 | 1170 |
| 1171 { | 1171 { |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1369 EXPECT_EQ(ScrollInertialPhaseNonMomentum, | 1369 EXPECT_EQ(ScrollInertialPhaseNonMomentum, |
| 1370 platformGestureBuilder.inertialPhase()); | 1370 platformGestureBuilder.inertialPhase()); |
| 1371 EXPECT_TRUE(platformGestureBuilder.synthetic()); | 1371 EXPECT_TRUE(platformGestureBuilder.synthetic()); |
| 1372 EXPECT_EQ(ScrollGranularity::ScrollByPage, | 1372 EXPECT_EQ(ScrollGranularity::ScrollByPage, |
| 1373 platformGestureBuilder.deltaUnits()); | 1373 platformGestureBuilder.deltaUnits()); |
| 1374 EXPECT_EQ(12345U, platformGestureBuilder.uniqueTouchEventId()); | 1374 EXPECT_EQ(12345U, platformGestureBuilder.uniqueTouchEventId()); |
| 1375 } | 1375 } |
| 1376 } | 1376 } |
| 1377 | 1377 |
| 1378 } // namespace blink | 1378 } // namespace blink |
| OLD | NEW |