| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 | |
| 4 <style> | |
| 5 .editing { | |
| 6 border: 2px solid red; | |
| 7 } | |
| 8 .explanation { | |
| 9 border: 2px solid blue; | |
| 10 padding: 12px; | |
| 11 font-size: 24px; | |
| 12 margin-bottom: 24px; | |
| 13 } | |
| 14 .scenario { margin-bottom: 16px;} | |
| 15 .scenario:first-line { font-weight: bold; margin-bottom: 16px;} | |
| 16 .expected-results:first-line { font-weight: bold } | |
| 17 </style> | |
| 18 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | |
| 19 | |
| 20 <script> | |
| 21 if (window.internals) | |
| 22 internals.settings.setEditingBehavior('mac'); | |
| 23 | |
| 24 function editingTest() { | |
| 25 moveSelectionForwardByLineCommand(); | |
| 26 boldCommand(); | |
| 27 typeCharacterCommand(' '); | |
| 28 typeCharacterCommand('f'); | |
| 29 typeCharacterCommand('o'); | |
| 30 typeCharacterCommand('u'); | |
| 31 typeCharacterCommand('r'); | |
| 32 moveSelectionBackwardByLineCommand(); | |
| 33 extendSelectionForwardByWordCommand(); | |
| 34 copyCommand(); | |
| 35 moveSelectionForwardByWordCommand(); | |
| 36 moveSelectionForwardByWordCommand(); | |
| 37 moveSelectionForwardByWordCommand(); | |
| 38 pasteCommand(); | |
| 39 } | |
| 40 | |
| 41 </script> | |
| 42 | |
| 43 <title>Editing Test</title> | |
| 44 </head> | |
| 45 <body> | |
| 46 | |
| 47 <div class="explanation"> | |
| 48 <div class="scenario"> | |
| 49 Tests: | |
| 50 <br> | |
| 51 Pasting at style boundary does not crash or produce empty style span(s). | |
| 52 </div> | |
| 53 <div class="expected-results"> | |
| 54 Expected Results: | |
| 55 <br> | |
| 56 Should see this content in the red box below: | |
| 57 <br><div>one two three <b>four</b>one</div> | |
| 58 </div> | |
| 59 </div> | |
| 60 | |
| 61 <div contenteditable id="root"> | |
| 62 <div id="test" class="editing">one two three</div> | |
| 63 </div> | |
| 64 | |
| 65 <script> | |
| 66 runEditingTest(); | |
| 67 </script> | |
| 68 | |
| 69 </body> | |
| 70 </html> | |
| OLD | NEW |