blob: 324e858c377b3925bd48deb7e6f381d89986dcd5 [file] [log] [blame]
<div id="description">This tests to see that tabs are put into tab spans when they are copied individually. The pasted tab should be inside of a tab span, not a style span. To run the test manually, paste and then inspect the editable region, and ensure that there is a tab span at the beginning of the editable div.</div>
<div id="edit" contenteditable="true"><span style="white-space:pre;"> </span>xxx</div>
<script>
if (window.testRunner)
testRunner.dumpAsText();
edit = document.getElementById("edit");
window.getSelection().collapse(edit, 0);
window.getSelection().modify("extend", "forward", "character");
document.execCommand("Copy");
window.getSelection().modify("move", "backward", "character");
document.execCommand("Paste");
if (window.testRunner)
document.body.innerText = document.getElementById("description").innerText + "\n\n" + edit.innerHTML;
</script>