OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 } | 322 } |
323 } | 323 } |
324 } | 324 } |
325 void TouchActionTest::sendTouchEvent(WebView* webView, WebInputEvent::Type type,
IntPoint clientPoint) | 325 void TouchActionTest::sendTouchEvent(WebView* webView, WebInputEvent::Type type,
IntPoint clientPoint) |
326 { | 326 { |
327 ASSERT_TRUE(type == WebInputEvent::TouchStart || type == WebInputEvent::Touc
hCancel); | 327 ASSERT_TRUE(type == WebInputEvent::TouchStart || type == WebInputEvent::Touc
hCancel); |
328 | 328 |
329 WebTouchEvent webTouchEvent; | 329 WebTouchEvent webTouchEvent; |
330 webTouchEvent.type = type; | 330 webTouchEvent.type = type; |
331 if (type == WebInputEvent::TouchCancel) | 331 if (type == WebInputEvent::TouchCancel) |
332 webTouchEvent.cancelable = false; | 332 webTouchEvent.dispatchType = WebInputEvent::EventNonBlocking; |
333 webTouchEvent.touchesLength = 1; | 333 webTouchEvent.touchesLength = 1; |
334 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ? | 334 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ? |
335 WebTouchPoint::StatePressed : | 335 WebTouchPoint::StatePressed : |
336 WebTouchPoint::StateCancelled); | 336 WebTouchPoint::StateCancelled); |
337 webTouchEvent.touches[0].id = kfakeTouchId; | 337 webTouchEvent.touches[0].id = kfakeTouchId; |
338 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); | 338 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); |
339 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); | 339 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); |
340 webTouchEvent.touches[0].position.x = clientPoint.x(); | 340 webTouchEvent.touches[0].position.x = clientPoint.x(); |
341 webTouchEvent.touches[0].position.y = clientPoint.y(); | 341 webTouchEvent.touches[0].position.y = clientPoint.y(); |
342 webTouchEvent.touches[0].radiusX = 10; | 342 webTouchEvent.touches[0].radiusX = 10; |
(...skipping 24 matching lines...) Expand all Loading... |
367 { | 367 { |
368 runShadowDOMTest("touch-action-shadow-dom.html"); | 368 runShadowDOMTest("touch-action-shadow-dom.html"); |
369 } | 369 } |
370 | 370 |
371 TEST_F(TouchActionTest, Pan) | 371 TEST_F(TouchActionTest, Pan) |
372 { | 372 { |
373 runTouchActionTest("touch-action-pan.html"); | 373 runTouchActionTest("touch-action-pan.html"); |
374 } | 374 } |
375 | 375 |
376 } // namespace blink | 376 } // namespace blink |
OLD | NEW |