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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 ASSERT_TRUE(type == WebInputEvent::TouchStart || type == WebInputEvent::Touc
hCancel); | 304 ASSERT_TRUE(type == WebInputEvent::TouchStart || type == WebInputEvent::Touc
hCancel); |
305 | 305 |
306 WebTouchEvent webTouchEvent; | 306 WebTouchEvent webTouchEvent; |
307 webTouchEvent.type = type; | 307 webTouchEvent.type = type; |
308 if (type == WebInputEvent::TouchCancel) | 308 if (type == WebInputEvent::TouchCancel) |
309 webTouchEvent.cancelable = false; | 309 webTouchEvent.cancelable = false; |
310 webTouchEvent.touchesLength = 1; | 310 webTouchEvent.touchesLength = 1; |
311 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ? | 311 webTouchEvent.touches[0].state = (type == WebInputEvent::TouchStart ? |
312 WebTouchPoint::StatePressed : | 312 WebTouchPoint::StatePressed : |
313 WebTouchPoint::StateCancelled); | 313 WebTouchPoint::StateCancelled); |
314 webTouchEvent.touches[0].id = kfakeTouchId; | 314 webTouchEvent.touches[0].pointerId = kfakeTouchId; |
315 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); | 315 webTouchEvent.touches[0].screenPosition.x = clientPoint.x(); |
316 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); | 316 webTouchEvent.touches[0].screenPosition.y = clientPoint.y(); |
317 webTouchEvent.touches[0].position.x = clientPoint.x(); | 317 webTouchEvent.touches[0].position.x = clientPoint.x(); |
318 webTouchEvent.touches[0].position.y = clientPoint.y(); | 318 webTouchEvent.touches[0].position.y = clientPoint.y(); |
319 webTouchEvent.touches[0].radiusX = 10; | 319 webTouchEvent.touches[0].width = 10; |
320 webTouchEvent.touches[0].radiusY = 10; | 320 webTouchEvent.touches[0].height = 10; |
321 | 321 |
322 webView->handleInputEvent(webTouchEvent); | 322 webView->handleInputEvent(webTouchEvent); |
323 runPendingTasks(); | 323 runPendingTasks(); |
324 } | 324 } |
325 | 325 |
326 // crbug.com/411038 | 326 // crbug.com/411038 |
327 TEST_F(TouchActionTest, Simple) | 327 TEST_F(TouchActionTest, Simple) |
328 { | 328 { |
329 runTouchActionTest("touch-action-simple.html"); | 329 runTouchActionTest("touch-action-simple.html"); |
330 } | 330 } |
331 | 331 |
332 TEST_F(TouchActionTest, Overflow) | 332 TEST_F(TouchActionTest, Overflow) |
333 { | 333 { |
334 runTouchActionTest("touch-action-overflow.html"); | 334 runTouchActionTest("touch-action-overflow.html"); |
335 } | 335 } |
336 | 336 |
337 TEST_F(TouchActionTest, ShadowDOM) | 337 TEST_F(TouchActionTest, ShadowDOM) |
338 { | 338 { |
339 runShadowDOMTest("touch-action-shadow-dom.html"); | 339 runShadowDOMTest("touch-action-shadow-dom.html"); |
340 } | 340 } |
341 | 341 |
342 TEST_F(TouchActionTest, Pan) | 342 TEST_F(TouchActionTest, Pan) |
343 { | 343 { |
344 runTouchActionTest("touch-action-pan.html"); | 344 runTouchActionTest("touch-action-pan.html"); |
345 } | 345 } |
346 | 346 |
347 } // namespace blink | 347 } // namespace blink |
OLD | NEW |