2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / editing / pasteboard / 5665299.html
blob7f68d9c7c122a19bd5c56bbff7b96ca935600135
1 <div id="description">This tests for a bug where pasting plain text into an empty contenteditable div would create paragraphs held in clones of the contenteditable div. To run it manually, do a Paste and Match style and then inspect the editable region. It should contain paragraphs held in regular divs.</div>
2 <textarea id="copy">test
5 </textarea>
6 <div id="paste" contenteditable="true"><br></div>
8 <script>
9 if (window.layoutTestController)
10 window.layoutTestController.dumpAsText();
12 copy = document.getElementById("copy");
13 copy.focus();
14 document.execCommand("SelectAll");
15 document.execCommand("Copy");
17 paste = document.getElementById("paste");
18 paste.focus();
19 document.execCommand("PasteAndMatchStyle");
20 document.body.innerText = document.getElementById("description").innerText + "\n\n" + paste.innerHTML;
21 </script>