blob: 6ce549252daf2ac48c85c1b36fcee34b7825e783 [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" style="resize: none;">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>