<!DOCTYPE html>
<html>
<body>
<div id="test" contenteditable>
<span style="background-color:green;">Delete this text and type in new text. Background color should be retained.</span>
</div>
<script src="../../resources/dump-as-markup.js"></script>
<script>
    Markup.description('Tests whether the background color is retained when all the text is deleted and new text is typed in.');

    var testDiv = document.getElementById("test");
    testDiv.focus();

    document.execCommand("selectAll");
    document.execCommand("Delete");
    document.execCommand("InsertText", false, "New Text");

    Markup.dump(testDiv);
</script>
</body>
</html>
