Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <body> | |
| 4 <textarea id='test' cols=5 rows=4> | |
|
yosin_UTC9
2014/01/09 01:18:26
nit: Please use double quote for HTML markup. Note
ziran.sun
2014/01/09 10:45:39
Done.
| |
| 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'); | |
|
yosin_UTC9
2014/01/09 01:18:26
nit: We may want to have consistency of command na
ziran.sun
2014/01/09 10:45:39
Done.
ziran.sun
2014/01/09 10:45:39
Thanks for this. I need to pay more attentions on
| |
| 19 document.execCommand('paste'); | |
| 20 shouldBeEqualToString('textarea.value', '\n'); | |
| 21 </script> | |
| 22 </body> | |
| 23 </html> | |
| OLD | NEW |