OLD | NEW |
1 <div id="description">This tests to see that tabs are put into tab spans when th
ey 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 reg
ion, and ensure that there is a tab span at the beginning of the editable div.</
div> | 1 <div id="description">This tests to see that tabs are put into tab spans when th
ey 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 reg
ion, and ensure that there is a tab span at the beginning of the editable div.</
div> |
2 <div id="edit" contenteditable="true"><span class="Apple-tab-span" style="white-
space:pre;">» </span>xxx</div> | 2 <div id="edit" contenteditable="true"><span style="white-space:pre;">» </span>x
xx</div> |
3 <script> | 3 <script> |
4 if (window.testRunner) | 4 if (window.testRunner) |
5 window.testRunner.dumpAsText(); | 5 window.testRunner.dumpAsText(); |
6 edit = document.getElementById("edit"); | 6 edit = document.getElementById("edit"); |
7 | 7 |
8 window.getSelection().collapse(edit, 0); | 8 window.getSelection().collapse(edit, 0); |
9 window.getSelection().modify("extend", "forward", "character"); | 9 window.getSelection().modify("extend", "forward", "character"); |
10 document.execCommand("Copy"); | 10 document.execCommand("Copy"); |
11 window.getSelection().modify("move", "backward", "character"); | 11 window.getSelection().modify("move", "backward", "character"); |
12 document.execCommand("Paste"); | 12 document.execCommand("Paste"); |
13 if (window.testRunner) | 13 if (window.testRunner) |
14 document.body.innerText = document.getElementById("description").innerText +
"\n\n" + edit.innerHTML; | 14 document.body.innerText = document.getElementById("description").innerText +
"\n\n" + edit.innerHTML; |
15 </script> | 15 </script> |
OLD | NEW |