blob: 5ed39c2397d5130bb13fcc8834e13a09d65b9c9a [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
This tests setting caret inside a blockquote with a large offset and running execCommand('Delete'). WebKit should not crash and you should see PASS below:
<div id="test" contentEditable="true">
<blockquote type="cite" id="blockquote" style="font-size: 0px; min-block-size: 4px;"><br></blockquote>
</div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
window.getSelection().setPosition(document.getElementById('blockquote'), document.getElementById('blockquote').childNodes.length);
document.execCommand("Delete");
var test = document.getElementById('test');
if (test.innerHTML == '' || test.innerHTML == '<br>') // Allow a placeholder
document.writeln('PASS');
else
document.writeln('FAIL: expected empty line but got ' + test.innerHTML.replace('<', '&lt;'));
</script>
</body>
</html>