OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <style> | 4 <style> |
5 .editing { | 5 .editing { |
6 border: 2px solid red; | 6 border: 2px solid red; |
7 font-size: 24px; | 7 font-size: 24px; |
8 } | 8 } |
9 .explanation { | 9 .explanation { |
10 border: 2px solid blue; | 10 border: 2px solid blue; |
(...skipping 28 matching lines...) Expand all Loading... |
39 </div> | 39 </div> |
40 <script> | 40 <script> |
41 function sendDeleteWordKey() | 41 function sendDeleteWordKey() |
42 { | 42 { |
43 var deleteWordModifiers; | 43 var deleteWordModifiers; |
44 if (navigator.userAgent.search(/\bMac OS X\b/) != -1) | 44 if (navigator.userAgent.search(/\bMac OS X\b/) != -1) |
45 deleteWordModifiers = ["altKey"]; | 45 deleteWordModifiers = ["altKey"]; |
46 else | 46 else |
47 deleteWordModifiers = ["ctrlKey"]; | 47 deleteWordModifiers = ["ctrlKey"]; |
48 if (window.eventSender) | 48 if (window.eventSender) |
49 eventSender.keyDown(String.fromCharCode(8), deleteWordModifiers); | 49 eventSender.keyDown("backspace", deleteWordModifiers); |
50 debugForDumpAsText("DeleteWord"); | 50 debugForDumpAsText("DeleteWord"); |
51 } | 51 } |
52 | 52 |
53 function editingTest() | 53 function editingTest() |
54 { | 54 { |
55 moveSelectionForwardByWordCommand(); | 55 moveSelectionForwardByWordCommand(); |
56 moveSelectionForwardByWordCommand(); | 56 moveSelectionForwardByWordCommand(); |
57 sendDeleteWordKey(); | 57 sendDeleteWordKey(); |
58 undoCommand(); | 58 undoCommand(); |
59 } | 59 } |
60 | 60 |
61 runDumpAsTextEditingTest(true); | 61 runDumpAsTextEditingTest(true); |
62 </script> | 62 </script> |
63 </body> | 63 </body> |
64 </html> | 64 </html> |
OLD | NEW |