4 <textarea cols=
50 rows=
10>first
6 <script src=
"../../resources/js-test.js"></script>
10 if (window
.testRunner
)
11 testRunner
.dumpAsText();
13 var textarea
= document
.querySelector('textarea');
15 function selectFirstLineIncludingLineBreak() {
17 textarea
.setSelectionRange(0, 0);
18 getSelection().modify('extend', 'forward', 'line');
21 function copyPaste() {
22 document
.execCommand('copy');
23 document
.execCommand('paste');
26 var offsetAfterLineBreak
= 6;
27 shouldBe("selectFirstLineIncludingLineBreak(); copyPaste(); textarea.selectionEnd", "offsetAfterLineBreak");