OLD | NEW |
1 <html><head></head> | 1 <html><head></head> |
2 <body> | 2 <body> |
3 <p>This test verifies that the correct sequence of keyboard events is generated
for a keypress for certain special keys. To test manually, press keys and compar
e results to other browsers.</p> | 3 <p>This test verifies that the correct sequence of keyboard events is generated
for a keypress for certain special keys. To test manually, press keys and compar
e results to other browsers.</p> |
4 <input type="text"></input> | 4 <input type="text"></input> |
5 <div id="log"></div> | 5 <div id="log"></div> |
6 | 6 |
7 <script> | 7 <script> |
8 function log(msg) { | 8 function log(msg) { |
9 document.getElementById("log").innerHTML+= msg + "<br>"; | 9 document.getElementById("log").innerHTML+= msg + "<br>"; |
10 } | 10 } |
(...skipping 25 matching lines...) Expand all Loading... |
36 input.addEventListener('keypress', logEvent, false); | 36 input.addEventListener('keypress', logEvent, false); |
37 input.addEventListener('keydown', logEvent, false); | 37 input.addEventListener('keydown', logEvent, false); |
38 input.addEventListener('keyup', logEvent, false); | 38 input.addEventListener('keyup', logEvent, false); |
39 input.focus(); | 39 input.focus(); |
40 | 40 |
41 if (window.testRunner) { | 41 if (window.testRunner) { |
42 testRunner.dumpAsText(); | 42 testRunner.dumpAsText(); |
43 log("<br>Ampersand:"); | 43 log("<br>Ampersand:"); |
44 eventSender.keyDown("7", ["shiftKey"]); | 44 eventSender.keyDown("7", ["shiftKey"]); |
45 log("<br>Backspace:"); | 45 log("<br>Backspace:"); |
46 eventSender.keyDown("\x08", []); | 46 eventSender.keyDown("backspace", []); |
47 log("<br>Percent:"); | 47 log("<br>Percent:"); |
48 eventSender.keyDown("5", ["shiftKey"]); | 48 eventSender.keyDown("5", ["shiftKey"]); |
49 log("<br>Backspace:"); | 49 log("<br>Backspace:"); |
50 eventSender.keyDown("\x08", []); | 50 eventSender.keyDown("backspace", []); |
51 log("<br>Left parenthesis:"); | 51 log("<br>Left parenthesis:"); |
52 eventSender.keyDown("9", ["shiftKey"]); | 52 eventSender.keyDown("9", ["shiftKey"]); |
53 log("<br>Backspace:"); | 53 log("<br>Backspace:"); |
54 eventSender.keyDown("\x08", []); | 54 eventSender.keyDown("backspace", []); |
55 log("<br>Right parenthesis:"); | 55 log("<br>Right parenthesis:"); |
56 eventSender.keyDown("0", ["shiftKey"]); | 56 eventSender.keyDown("0", ["shiftKey"]); |
57 log("<br>Backspace:"); | 57 log("<br>Backspace:"); |
58 eventSender.keyDown("\x08", []); | 58 eventSender.keyDown("backspace", []); |
59 log("<br>Print screen:"); | 59 log("<br>Print screen:"); |
60 eventSender.keyDown("printScreen", []); | 60 eventSender.keyDown("printScreen", []); |
61 } | 61 } |
62 </script> | 62 </script> |
63 </body></html> | 63 </body></html> |
OLD | NEW |