OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>InputEvent: data field from keyboard</title> | 4 <title>InputEvent: data field from keyboard</title> |
5 <script src="../../../resources/testharness.js"></script> | 5 <script src="../../../resources/testharness.js"></script> |
6 <script src="../../../resources/testharnessreport.js"></script> | 6 <script src="../../../resources/testharnessreport.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <p id="txt" contenteditable></p> | 9 <p id="txt" contenteditable></p> |
10 <script> | 10 <script> |
(...skipping 21 matching lines...) Expand all Loading... |
32 inputData = NOT_FIRED; | 32 inputData = NOT_FIRED; |
33 eventSender.keyDown(key, modifiers); | 33 eventSender.keyDown(key, modifiers); |
34 assert_equals(beforeinputData, data, `${modifiers.toString()}+${key} sho
uld produce beforeinput data: ${data}`); | 34 assert_equals(beforeinputData, data, `${modifiers.toString()}+${key} sho
uld produce beforeinput data: ${data}`); |
35 assert_equals(inputData, data, `${modifiers.toString()}+${key} should pr
oduce input data: ${data}`); | 35 assert_equals(inputData, data, `${modifiers.toString()}+${key} should pr
oduce input data: ${data}`); |
36 } | 36 } |
37 | 37 |
38 txt.focus(); | 38 txt.focus(); |
39 // Typing | 39 // Typing |
40 testKeyDownData('a', [], 'a'); | 40 testKeyDownData('a', [], 'a'); |
41 testKeyDownData('4', [], '4'); | 41 testKeyDownData('4', [], '4'); |
42 testKeyDownData('Backspace', [], null); | 42 testKeyDownData('Backspace', [], ''); |
43 testKeyDownData('L', ['shiftKey'], 'L'); | 43 testKeyDownData('L', ['shiftKey'], 'L'); |
44 testKeyDownData('^', ['shiftKey'], '^'); | 44 testKeyDownData('^', ['shiftKey'], '^'); |
45 testKeyDownData(' ', [], ' '); | 45 testKeyDownData(' ', [], ' '); |
46 }, 'Testing data field from keyboard'); | 46 }, 'Testing data field from keyboard'); |
47 </script> | 47 </script> |
48 </body> | 48 </body> |
49 </html> | 49 </html> |
OLD | NEW |