blob: 903fa5d6667986aed964348810d107ceaf976f7e [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();
internals.settings.setSimpleLineLayoutEnabled(false);
}
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;
</script>