| <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] --> |
| |
| <html> |
| <head> |
| <meta name="viewport" content="initial-scale=1.0"> |
| <script id="ui-script" type="text/plain"> |
| (function() { |
| uiController.didShowKeyboardCallback = function() { |
| uiController.uiScriptComplete("Successfully showed keyboard."); |
| } |
| uiController.singleTapAtPoint(50, 25, function() { }); |
| })(); |
| </script> |
| |
| <script> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function getUIScript() |
| { |
| return document.getElementById("ui-script").text; |
| } |
| |
| function handleTouchEvent(event) |
| { |
| event.target.focus(); |
| event.preventDefault(); |
| } |
| |
| function runTest() |
| { |
| if (window.testRunner && testRunner.runUIScript) |
| testRunner.runUIScript(getUIScript(), function(result) { |
| document.getElementById("console").textContent = result; |
| testRunner.notifyDone(); |
| }); |
| else |
| document.getElementById("console").textContent = "This tests that a node can be assisted when focused due to a touch event, even when the focus does not change. Tapping the below input should show the keyboard. Best run using WKTR." |
| } |
| </script> |
| |
| <style> |
| input:focus { |
| outline: none; |
| border: 1px solid #4D90FE; |
| } |
| |
| input { |
| width: 100px; |
| height: 50px; |
| } |
| </style> |
| |
| </head> |
| |
| <body style="margin: 0;" onload="runTest()"> |
| <input autofocus ontouchstart="handleTouchEvent(event)"></input> |
| <div id="console">Failed to show keyboard.</div> |
| </body> |
| </html> |