blob: 478c326d9c11d6caec8af26f9f2f7ab26ca5dc87 [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 class="Apple-tab-span" style="white-space:pre;"> </span>xxx</div>
<script>
if (window.layoutTestController)
window.layoutTestController.dumpAsText();
edit = document.getElementById("edit");
window.getSelection().setPosition(edit, 0);
window.getSelection().modify("extend", "forward", "character");
document.execCommand("Copy");
window.getSelection().modify("move", "backward", "character");
document.execCommand("Paste");
if (window.layoutTestController)
document.body.innerText = document.getElementById("description").innerText + "\n\n" + edit.innerHTML;
</script>