<!DOCTYPE html>
<html> 
<body>
<p>See bug 57148. When deleteing the last character in a table deletes the table, no styled spans should be left behind.
To test manually, place cursor after "X" and do a backward delete. No styled span should be created.</p>

<div id="root" contenteditable class="editing">
<table style="border-collapse:collapse"><tr><td id="cursor">X</td></tr></table>
</div>

<div id="result"></div>

<script src="../editing.js"></script>
<script>

function editingTest() {
    var cursorCell = document.getElementById("cursor");
    execSetSelectionCommand(cursorCell.firstChild, 1, cursorCell.firstChild, 1);
    execDeleteCommand();
    var styledSpans = document.getElementsByTagName("span");
    result.innerHTML = styledSpans.length == 0 ? "PASS" : "FAIL";
}

if (window.testRunner)
    runDumpAsTextEditingTest();
</script>
</body>
</html>
