| <p>This tests indenting nested divs. By indenting "hello", we should be able to enclose all three blocks 1 through 3 by a blockquote</p> |
| <div id="div" contenteditable="true"> |
| <div id="block1"><div id="block2"><div id="block3">hello</div></div></div> |
| </div> |
| <div id="c"></div> |
| <script> |
| |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var e = document.getElementById("block3"); |
| var s = window.getSelection(); |
| var r = document.createRange(); |
| r.setStart(e,0); |
| r.setEnd(e,1); |
| s.addRange(r); |
| document.execCommand("Indent", false, null); |
| text = document.createTextNode(document.getElementById('div').innerHTML); |
| document.getElementById('c').appendChild( text ); |
| </script> |