| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <body> | 2 <body> |
| 3 <script src="../../../resources/testharness.js"></script> | 3 <script src="../../../resources/testharness.js"></script> |
| 4 <script src="../../../resources/testharnessreport.js"></script> | 4 <script src="../../../resources/testharnessreport.js"></script> |
| 5 <div id="log"></div> | 5 <div id="log"></div> |
| 6 <textarea style="white-space:nowrap"></textarea> | 6 <textarea style="white-space:nowrap"></textarea> |
| 7 <script> | 7 <script> |
| 8 test(function() { | 8 test(function() { |
| 9 var textarea = document.querySelector('textarea'); | 9 var textarea = document.querySelector('textarea'); |
| 10 textarea.focus(); | 10 textarea.focus(); |
| 11 textarea.addEventListener('copy', function(event) { | 11 textarea.addEventListener('copy', function(event) { |
| 12 event.clipboardData.setData('text', 'a\r\n\r\n b\r\n'); | 12 event.clipboardData.setData('text', 'a\r\n\r\n b\r\n'); |
| 13 event.preventDefault(); | 13 event.preventDefault(); |
| 14 }); | 14 }); |
| 15 document.execCommand('copy'); | 15 document.execCommand('copy'); |
| 16 document.execCommand('paste'); | 16 document.execCommand('paste'); |
| 17 // TODO(tkent): The following assertion fails now. crbug.com/2007 and | |
| 18 // crbug.com/528491. | |
| 19 assert_equals(textarea.value, 'a\n\n b\n'); | 17 assert_equals(textarea.value, 'a\n\n b\n'); |
| 20 }, 'TEXTAREA with white-space:nowrap should not increase the number of EOLs'); | 18 }, 'TEXTAREA with white-space:nowrap should not increase the number of EOLs'); |
| 21 </script> | 19 </script> |
| 22 </body> | 20 </body> |
| OLD | NEW |