Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / editing / pasteboard / copy-paste-ruby-text.html
blobee58c9eb1b31c96c21835a1697626274561cf6a7
1 <html>
2 <head>
3 <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <div id="container">
8 <div id="content" contenteditable>
9 <ruby>今日<rt>きょう</rt></ruby><ruby><rt></rt></ruby><ruby>天気<rt>てんき</rt></ruby>ですね。
10 <ruby><ruby><rt>ni</rt></ruby><ruby><rt>zai</rt></ruby><ruby>拉里<rt>zali</rt></ruby>
11 </div>
12 <textarea cols=50 rows=5></textarea>
13 </div>
14 <script>
16 description("This tests copying and pasting text with ruby doesn't insert new lines before and after rt."
17 + "To manually test, copy and paste the text into the textarea. There should be not new line in the textarea.");
19 document.getElementById('content').focus();
20 document.execCommand('SelectAll', false, null);
21 if (document.queryCommandSupported('Copy')) {
22 document.execCommand('Copy', false, null);
24 var textarea = document.querySelector('textarea');
25 textarea.focus();
26 document.execCommand('Paste', false, null);
27 shouldBe("textarea.value.indexOf('\\n')", "-1");
29 document.getElementById('container').style.display = 'none';
32 </script>
33 </body>
34 </html>