| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <style> | |
| 5 .editing { | |
| 6 border: 2px solid red; | |
| 7 font-size: 24px; | |
| 8 } | |
| 9 .explanation { | |
| 10 border: 2px solid blue; | |
| 11 padding: 12px; | |
| 12 font-size: 24px; | |
| 13 margin-bottom: 24px; | |
| 14 } | |
| 15 .scenario { margin-bottom: 16px;} | |
| 16 .scenario:first-line { font-weight: bold; margin-bottom: 16px;} | |
| 17 .expected-results:first-line { font-weight: bold } | |
| 18 </style> | |
| 19 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
| 20 <title>Editing Test</title> | |
| 21 </head> | |
| 22 <body> | |
| 23 <div class="explanation"> | |
| 24 <div class="scenario"> | |
| 25 Tests: | |
| 26 <br> | |
| 27 Option-delete when no typing command is open, then undo. | |
| 28 </div> | |
| 29 <div class="expected-results"> | |
| 30 Expected Results: | |
| 31 <br> | |
| 32 It should like this, with the word "two" selected: | |
| 33 <BR> | |
| 34 one two three four | |
| 35 </div> | |
| 36 </div> | |
| 37 <div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: s
pace; -khtml-line-break: after-white-space;"> | |
| 38 <div id="test" class="editing">one two three four</div> | |
| 39 </div> | |
| 40 <script> | |
| 41 function sendDeleteWordKey() | |
| 42 { | |
| 43 var deleteWordModifiers; | |
| 44 if (navigator.userAgent.search(/\bMac OS X\b/) != -1) | |
| 45 deleteWordModifiers = ["altKey"]; | |
| 46 else | |
| 47 deleteWordModifiers = ["ctrlKey"]; | |
| 48 if (window.eventSender) | |
| 49 eventSender.keyDown("Backspace", deleteWordModifiers); | |
| 50 debugForDumpAsText("DeleteWord"); | |
| 51 } | |
| 52 | |
| 53 function editingTest() | |
| 54 { | |
| 55 moveSelectionForwardByWordCommand(); | |
| 56 moveSelectionForwardByWordCommand(); | |
| 57 sendDeleteWordKey(); | |
| 58 undoCommand(); | |
| 59 } | |
| 60 | |
| 61 runDumpAsTextEditingTest(true); | |
| 62 </script> | |
| 63 </body> | |
| 64 </html> | |
| OLD | NEW |