<div id="container">
<iframe></iframe>
<div id="sample" contenteditable="true">
Foo<audio id="audio" src="bottom"></audio>Bar
</div>
</div>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function clearUndoStack() {
    document.querySelector('iframe').outerHTML = '';
}

function $(id) { return document.getElementById(id); }
$('sample').focus();
var range = document.createRange();
range.selectNodeContents($('sample'));
var selection = window.getSelection();
selection.removeAllRanges();
selection.addRange(range);

setTimeout(function() {
    clearUndoStack();
}, 0);


window.onload = function() {
    $('container').outerHTML = 'PASS; NOT CRASHED';
    if (window.testRunner)
        testRunner.notifyDone();
};

document.execCommand('Delete', false);
document.execCommand('InsertUnorderedList', false);
</script>
