1 <p>This tests selection preservation during an indent operation. The selection should start and end in the same parts of the words 'foo' and 'bar' before and after the indent operation.
</p>
2 <div id=
"div" contenteditable=
"true"><span id=
"foo">foo
</span><br><span id=
"bar">bar
</span></div>
5 var foo
= document
.getElementById("foo").firstChild
;
6 var bar
= document
.getElementById("bar").firstChild
;
7 var sel
= window
.getSelection();
8 sel
.setBaseAndExtent(foo
, 1, bar
, 2);
9 document
.execCommand("Indent");