3 <meta http-equiv=
"Content-type" content=
"text/html; charset=utf-8" />
4 <script src=
"../../resources/js-test.js"></script>
8 <div id=
"content" contenteditable
><div><ruby>你好
<rt>ni hao
</rt></ruby></ruby></div>
9 <ruby><ruby>很
<rt>hen
</rt></ruby><ruby>好
<rt>hao
</rt></ruby>?
11 <textarea cols=
50 rows=
5></textarea>
15 description("This tests copying and pasting text with ruby doesn't insert new lines before and after rt\n"
16 + "but still inserts a new line around a block element around ruby."
17 + "To manually test, copy and paste the text into the textarea. There should be not new line in the textarea.");
19 var content
= document
.getElementById('content');
21 document
.execCommand('SelectAll', false, null);
22 if (document
.queryCommandSupported('Copy')) {
23 document
.execCommand('Copy', false, null);
25 var textarea
= document
.querySelector('textarea');
26 var firstLine
= content
.firstChild
.innerText
;
28 document
.execCommand('Paste', false, null);
29 shouldBe("textarea.value.indexOf('\\n')", "firstLine.length");
31 document
.getElementById('container').style
.display
= 'none';