| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 | 3 |
| 4 <style> | 4 <style> |
| 5 .editing { | 5 .editing { |
| 6 border: 2px solid red; | 6 border: 2px solid red; |
| 7 padding: 12px; | 7 padding: 12px; |
| 8 font-size: 24px; | 8 font-size: 24px; |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <script src="../editing.js" language="JavaScript" type="text/JavaScript" ></scri
pt> | 11 <script src="../editing.js" language="JavaScript" type="text/JavaScript" ></scri
pt> |
| 12 | 12 |
| 13 <script> | 13 <script> |
| 14 | 14 |
| 15 function editingTest() { | 15 function editingTest() { |
| 16 moveSelectionForwardByWordCommand(); | 16 moveSelectionForwardByWordCommand(); |
| 17 moveSelectionForwardByCharacterCommand(); | 17 moveSelectionForwardByCharacterCommand(); |
| 18 moveSelectionForwardByCharacterCommand(); | 18 moveSelectionForwardByCharacterCommand(); |
| 19 moveSelectionForwardByCharacterCommand(); | 19 moveSelectionForwardByCharacterCommand(); |
| 20 deleteCommand(); | 20 deleteCommand(); |
| 21 deleteCommand(); | 21 deleteCommand(); |
| 22 forwardDeleteCommand(); | 22 forwardDeleteCommand(); |
| 23 forwardDeleteCommand(); | 23 forwardDeleteCommand(); |
| 24 undoCommand(); | 24 undoCommand(); |
| 25 } | 25 } |
| 26 | 26 |
| 27 </script> | 27 </script> |
| 28 | 28 |
| 29 </head> | 29 </head> |
| 30 <body> | 30 <body> |
| 31 <div contenteditable id="root" class="editing"> | 31 <div contenteditable id="root" class="editing"> |
| 32 <span id="test">This wo<b>rd </b>should be selected, since the test deleted it a
character at a time and then did an undo.</span> | 32 <span id="test">This wo<b>rd </b>should be selected, since the test deleted it a
character at a time and then did an undo.</span> |
| 33 </div> | 33 </div> |
| 34 | 34 |
| 35 <script> | 35 <script> |
| 36 if (window.internals) | 36 if (window.internals) |
| 37 internals.settings.setEditingBehavior("mac"); | 37 internals.settings.setEditingBehavior("mac"); |
| 38 runEditingTest(); | 38 runEditingTest(); |
| 39 </script> | 39 </script> |
| 40 | 40 |
| 41 </body> | 41 </body> |
| 42 </html> | 42 </html> |
| OLD | NEW |