OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <body> |
| 4 <textarea id="test" cols=5 rows=4> |
| 5 This test verifies that pasting a newline in a textarea with all text selected |
| 6 produces a newline. |
| 7 |
| 8 </textarea> |
| 9 <script src="../../resources/js-test.js"></script> |
| 10 <script> |
| 11 var textarea = document.getElementById('test'); |
| 12 textarea.focus(); |
| 13 |
| 14 // copy a new line |
| 15 textarea.setSelectionRange(99, 100); |
| 16 document.execCommand('Copy'); |
| 17 |
| 18 document.execCommand('SelectAll'); |
| 19 document.execCommand('Paste'); |
| 20 shouldBeEqualToString('textarea.value', '\n'); |
| 21 </script> |
| 22 </body> |
| 23 </html> |
OLD | NEW |