2 <div contenteditable=
"true" id=
"sample">foo
<input type=
"button" value=
"bar"> baz
</div>
4 <script src=
"../../resources/js-test.js"></script>
6 function $(id
) { return document
.getElementById(id
); }
8 var range
= document
.createRange();
9 range
.setStartAfter(document
.querySelector('input'));
10 var selection
= window
.getSelection();
11 selection
.removeAllRanges();
12 selection
.addRange(range
);
13 document
.execCommand('Delete');
14 document
.execCommand('InsertText', false, 'quux');
15 shouldBeEqualToString('$("sample").innerHTML', 'foo quux baz');
17 if (window
.testRunner
)
18 $('container').outerHTML
= '';