blob: 4a3e8fa093e03d0a2f424cf08b0aa2919a052539 [file] [log] [blame]
<p>Matching other execCommand identifiers, execCommand("InsertLineBreak") should not scroll the page to make selection visible.</p>
<p>This test only works in WebKit, as other engines do not implement this command.</p>
<div contenteditable>a</div>
<div style="height:10000"></div>
<script>
var text = document.getElementsByTagName('div')[0].firstChild;
window.getSelection().setBaseAndExtent(text, 0, text, 0);
window.scrollTo(0, 1000);
document.execCommand("InsertLineBreak");
var result = (window.pageYOffset == 1000) ? "SUCCESS" : "FAILURE";
if (window.layoutTestController) {
layoutTestController.dumpAsText();
document.write(result);
} else
alert(result);
</script>