blob: 9f5f4428dd194f06a51d86f0e40bfb2e2de8d388 [file] [log] [blame]
<script>
if (window.testRunner) {
testRunner.dumpEditingCallbacks();
testRunner.dumpAsLayoutWithPixelResults();
}
</script>
<p>This tests copying plain text with tabs and pasting it into an editable region using paste and match tyle. The tabs should be preserved.</p>
<textarea id="textarea">Tab-> <-Tab</textarea>
<div id="div" contenteditable="true"></div>
<script>
var textarea = document.getElementById("textarea");
textarea.focus();
textarea.setSelectionRange(0, 0);
document.execCommand("SelectAll");
document.execCommand("Copy");
var div = document.getElementById("div");
window.getSelection().collapse(div, 0);
document.execCommand("PasteAndMatchStyle");
</script>