| <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] --> |
| <html> |
| <head> |
| <meta name="viewport" content="width=device-width initial-scale=1 user-scalable=no"> |
| <title>This tests that we fire dblclick event on double tap</title> |
| <script src="../../../../resources/basic-gestures.js"></script> |
| <style> |
| #doubleTapthis { |
| width: 400px; |
| height: 400px; |
| border: 1px solid green; |
| } |
| </style> |
| <script> |
| async function test() { |
| if (!window.testRunner || !testRunner.runUIScript) |
| return; |
| |
| testRunner.waitUntilDone(); |
| testRunner.dumpAsText(); |
| |
| await doubleTapAtPoint(doubleTapthis.offsetLeft, doubleTapthis.offsetTop); |
| } |
| </script> |
| </head> |
| <body onload="test()"> |
| <div id=doubleTapthis>PASS if 'double click' text is shown below.</div> |
| <pre id=result></pre> |
| <script> |
| |
| doubleTapthis.addEventListener("click", function( event ) { |
| result.innerHTML = result.innerHTML + "[click]"; |
| }, false); |
| |
| doubleTapthis.addEventListener("dblclick", function( event ) { |
| result.innerHTML = result.innerHTML + "[double click]"; |
| if (window.testRunner) |
| setTimeout("testRunner.notifyDone()", 0); |
| }, false); |
| </script> |
| </body> |
| </html> |