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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ? | 332 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ? |
333 WebTouchPoint::StatePressed : | 333 WebTouchPoint::StatePressed : |
334 WebTouchPoint::StateCancelled); | 334 WebTouchPoint::StateCancelled); |
335 webTouchEvent.touches[0].id = kfakeTouchId; | 335 webTouchEvent.touches[0].id = kfakeTouchId; |
336 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); | 336 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); |
337 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); | 337 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); |
338 webTouchEvent.touches[0].position.x = clientPoint.x(); | 338 webTouchEvent.touches[0].position.x = clientPoint.x(); |
339 webTouchEvent.touches[0].position.y = clientPoint.y(); | 339 webTouchEvent.touches[0].position.y = clientPoint.y(); |
340 webTouchEvent.touches[0].radiusX = 10; | 340 webTouchEvent.touches[0].radiusX = 10; |
341 webTouchEvent.touches[0].radiusY = 10; | 341 webTouchEvent.touches[0].radiusY = 10; |
| 342 webTouchEvent.touches[0].force = 1.0; |
342 | 343 |
343 webView->handleInputEvent(webTouchEvent); | 344 webView->handleInputEvent(webTouchEvent); |
344 runPendingTasks(); | 345 runPendingTasks(); |
345 } | 346 } |
346 | 347 |
347 // crbug.com/411038 | 348 // crbug.com/411038 |
348 TEST_F(TouchActionTest, Simple) | 349 TEST_F(TouchActionTest, Simple) |
349 { | 350 { |
350 runTouchActionTest("touch-action-simple.html"); | 351 runTouchActionTest("touch-action-simple.html"); |
351 } | 352 } |
(...skipping 12 matching lines...) Expand all Loading... |
364 { | 365 { |
365 runShadowDOMTest("touch-action-shadow-dom.html"); | 366 runShadowDOMTest("touch-action-shadow-dom.html"); |
366 } | 367 } |
367 | 368 |
368 TEST_F(TouchActionTest, Pan) | 369 TEST_F(TouchActionTest, Pan) |
369 { | 370 { |
370 runTouchActionTest("touch-action-pan.html"); | 371 runTouchActionTest("touch-action-pan.html"); |
371 } | 372 } |
372 | 373 |
373 } // namespace blink | 374 } // namespace blink |
OLD | NEW |