| <p>This tests character insertion on a line with an unrendered text node. You should see 'Hello' and then 'World' below.</p> |
| <div id="div" contenteditable="true"><table border="1"><tr><td>Hello</td></tr></table><br></div> |
| |
| <script> |
| if (window.testRunner) |
| window.testRunner.dumpAsText(); |
| |
| var div = document.getElementById("div"); |
| children = div.childNodes; |
| br = children[1]; |
| text = document.createTextNode('\n'); |
| div.insertBefore(text, br); |
| sel = window.getSelection(); |
| sel.setPosition(div, 1); |
| document.execCommand("InsertText", false, "World"); |
| </script> |