blob: f9a3cbd488cf5edecdd10a68267596384ff8a06d [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.testRunner && window.internals)
window.testRunner.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.testRunner) {
document.body.innerText = document.getElementById("description").innerText + "\n\n" + edit.innerHTML;
document.body.style.whiteSpace = 'pre';
}
</script>