| <div id="test" contenteditable> |
| <span style="background-color:green;">Delete this text and type in new text. Background color should be retained.</span> |
| <script src="../../resources/dump-as-markup.js"></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"); |
| document.execCommand("selectAll"); |
| document.execCommand("Delete"); |
| document.execCommand("InsertText", false, "New Text"); |