| 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="../../resources/js-test.js"></script> | 11 <script src="../../resources/js-test.js"></script> |
| 12 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> | 12 <script src=../editing.js language="JavaScript" type="text/JavaScript" ></script
> |
| 13 | 13 |
| 14 <script> | 14 <script> |
| 15 | 15 |
| 16 jsTestIsAsync = true; | 16 jsTestIsAsync = true; |
| 17 | 17 |
| 18 if (window.internals) | |
| 19 internals.settings.setUnifiedTextCheckerEnabled(true); | |
| 20 | |
| 21 function editingTest() { | 18 function editingTest() { |
| 22 | 19 |
| 23 var elem = document.getElementById("test"); | 20 var elem = document.getElementById("test"); |
| 24 var selection = window.getSelection(); | 21 var selection = window.getSelection(); |
| 25 selection.collapse(elem, elem.childNodes.length); | 22 selection.collapse(elem, elem.childNodes.length); |
| 26 | 23 |
| 27 typeCharacterCommand('z'); | 24 typeCharacterCommand('z'); |
| 28 typeCharacterCommand('z'); | 25 typeCharacterCommand('z'); |
| 29 typeCharacterCommand(' '); | 26 typeCharacterCommand(' '); |
| 30 typeCharacterCommand('a'); | 27 typeCharacterCommand('a'); |
| (...skipping 25 matching lines...) Expand all Loading... |
| 56 </script> | 53 </script> |
| 57 <div contenteditable id="root" class="editing"> | 54 <div contenteditable id="root" class="editing"> |
| 58 <!-- we need to lead "Hello," to preserve the marker even after collapse() --> | 55 <!-- we need to lead "Hello," to preserve the marker even after collapse() --> |
| 59 <span id="test">Hello,</span> | 56 <span id="test">Hello,</span> |
| 60 </div> | 57 </div> |
| 61 <script> | 58 <script> |
| 62 editingTest(); | 59 editingTest(); |
| 63 </script> | 60 </script> |
| 64 </body> | 61 </body> |
| 65 </html> | 62 </html> |
| OLD | NEW |