blob: d4224f6066259a41cf32c3f663b1183ce8c07875 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<div id="log"></div>
<textarea style="white-space:nowrap"></textarea>
<script>
test(function() {
var textarea = document.querySelector('textarea');
textarea.focus();
textarea.addEventListener('copy', function(event) {
event.clipboardData.setData('text', 'a\r\n\r\n b\r\n');
event.preventDefault();
});
document.execCommand('copy');
document.execCommand('paste');
assert_equals(textarea.value, 'a\n\n b\n');
}, 'TEXTAREA with white-space:nowrap should not increase the number of EOLs');
</script>
</body>