<!DOCTYPE html>
<body>
</body>
<script type="text/javascript">

if (window.testRunner)
    testRunner.dumpAsText();

document.designMode = 'on';
document.execCommand("SelectAll");
document.documentElement.removeChild(document.body);
document.execCommand("FormatBlock", false, "div");

document.documentElement.appendChild(document.createElement('body'));
document.body.innerText = 'This tests executing FormatBlock command without body element.\n'
 + 'The passes if WebKit does not crash.\n\n'
 + 'PASS\n\n';

</script>
