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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/input/paste-linebreak-into-initially-hidden-textarea.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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-nowrap-paste-eol.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <p>This tests pasting into a textarea that starts with a line break that didn't initially have a renderer (display: none). 4 <p>This tests pasting into a textarea that starts with a line break that didn't initially have a renderer (display: none).
5 WebKit should still be able to paste text with line breaks.</p> 5 WebKit should still be able to paste text with line breaks.</p>
6 <textarea id="test" style="display: none" cols="50" rows="10"></textarea> 6 <textarea id="test" style="display: none" cols="50" rows="10"></textarea>
7 <div id="log"></div> 7 <div id="log"></div>
8 <script type="text/javascript"> 8 <script type="text/javascript">
9 9
10 if (window.testRunner) 10 if (window.testRunner)
11 testRunner.dumpAsText(); 11 testRunner.dumpAsText();
12 12
13 var textarea = document.querySelector('textarea'); 13 var textarea = document.querySelector('textarea');
14 textarea.value = "\nwebkit"; 14 textarea.value = "\nwebkit";
15 textarea.style.display = ""; 15 textarea.style.display = "";
16 16
17 textarea.focus(); 17 textarea.focus();
18 textarea.selectionStart = textarea.selectionEnd = 0; 18 textarea.selectionStart = textarea.selectionEnd = 0;
19 document.execCommand('insertHTML', false, 'hello\nworld\n'); 19 document.execCommand('insertHTML', false, 'hello\nworld\n');
20 20
21 var expected = 'hello\nworld\nwebkit'; 21 var expected = 'hello\nworld\n\nwebkit';
22 if (textarea.value == expected) 22 if (textarea.value == expected)
23 document.getElementById('log').innerText = 'PASS'; 23 document.getElementById('log').innerText = 'PASS';
24 else 24 else
25 document.getElementById('log').innerText = 'FAILED: expected "' + expected + '" but got "' + textarea.value + '"'; 25 document.getElementById('log').innerText = 'FAILED: expected "' + expected + '" but got "' + textarea.value + '"';
26 26
27 </script> 27 </script>
28 </body> 28 </body>
29 </html> 29 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-nowrap-paste-eol.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698