2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / editing / pasteboard / 5065605.html
blobec754651e867c14409648171bd3c022f5332582f
1 <p>This tests for a bug where text copied with Select All + Copy would lose its color.</p>
2 <div id="div" contenteditable="true"><br></div>
4 <script>
5 var div = document.getElementById("div");
6 div.focus();
8 document.execCommand("InsertText", false, "This text should be red.");
9 document.execCommand("InsertParagraph");
10 document.execCommand("InsertText", false, "This text should be red.");
11 document.execCommand("SelectAll");
12 document.execCommand("ForeColor", false, "red");
13 document.execCommand("Copy");
14 window.getSelection().modify("move", "forward", "character");
15 document.execCommand("InsertParagraph");
16 document.execCommand("Paste");
17 </script>