blob: 5f326941cb96f0684df60e52579fdb33f8e4f874 [file] [log] [blame]
<!doctype html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../assert_selection.js"></script>
<div id="log"></div>
<script>
test(() => assert_selection(
'<div contenteditable>|</div>',
selection => {
selection.document.execCommand('insertText', false, 'foo');
selection.document.execCommand('undo');
selection.document.execCommand('redo');
},
'<div contenteditable>foo|</div>'),
'Redo insertText on empty editable');
test(() => assert_selection(
'<div contenteditable>fo|o</div>',
selection => {
selection.document.execCommand('insertText', false, 'bar');
selection.document.execCommand('undo');
selection.document.execCommand('redo');
},
'<div contenteditable>fobar|o</div>'),
'Redo insertText on non-empty editable');
</script>