Implement keyboard event sending for iOS in WebKitTestRunner
[WebKit-https.git] / LayoutTests / fast / events / ios / input-value-after-oninput.html
1 <html>
2
3 <head>
4     <meta name="viewport" content="initial-scale=1.0">
5     <script id="ui-script" type="text/plain">
6         (function() {
7             uiController.singleTapAtPoint(50, 25, function() {
8                 uiController.didShowKeyboardCallback = function() {
9                     uiController.typeCharacterUsingHardwareKeyboard("a", function() { });
10                 }
11             });
12         })();
13     </script>
14
15     <script>
16         if (window.testRunner) {
17             testRunner.dumpAsText();
18             testRunner.waitUntilDone();
19         }
20
21         function getUIScript()
22         {
23             return document.getElementById("ui-script").text;
24         }
25
26         function handleValueChanged(value) {
27             document.getElementById("console").textContent = "Successfully handled oninput, value is now \"" + value + "\"";
28             testRunner.notifyDone();
29         }
30
31         function runTest()
32         {
33             if (!window.testRunner || !testRunner.runUIScript)
34                 return;
35
36             testRunner.runUIScript(getUIScript(), function(result) { });
37         }
38     </script>
39 </head>
40
41 <body style="margin: 0;" onload="runTest()">
42     <input style="width: 100px; height: 50px;" id="test-input" oninput="handleValueChanged(this.value)">
43 <div id="console">Failed to handle oninput<div>
44 </body>
45
46 </html>