22 lines
605 B
HTML
22 lines
605 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<body>
|
|
<p>This tests modifying the value of text node that's pointed by the selection and executing an editing command. WebKit should not crash and you should see PASS:</p>
|
|
<div id="test" contenteditable>hello world</div>
|
|
<script>
|
|
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
var test = document.getElementById('test');
|
|
test.focus();
|
|
window.getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 10);
|
|
test.firstChild.data = 'hey';
|
|
document.execCommand('insertLineBreak', false, null);
|
|
|
|
test.innerHTML = 'PASS';
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|