Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-nowrap-paste-eol.html

Issue 1780413002: Editing: Skip TestRendering in ReplaceSelectionCommand if the editing host is plain-text editable a… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: accept only last interchangenewline Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698