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

Side by Side Diff: LayoutTests/editing/pasteboard/paste-newline-in-all-selected-textarea.html

Issue 113663003: Keep br while replacing plain texts with content ending with newline (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test case for paste newline in a all selected textarea Created 7 years 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
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <textarea id="test" cols=5 rows=4>
5 test
6
7 </textarea>
8 <script src="../../resources/js-test.js"></script>
9 <script>
10
yosin_UTC9 2013/12/20 01:23:06 nit: Please remove an extra blank line.
ziran.sun 2014/01/02 16:03:30 Done.
11 if (window.testRunner)
12 testRunner.dumpAsText();
yosin_UTC9 2013/12/20 01:23:06 You don't need to call testRunner.dumpAsText(). js
ziran.sun 2014/01/02 16:03:30 Done.
13
14 var newlineText = '\n';
yosin_UTC9 2013/12/20 01:23:06 nit: We don't need to use |newlineText|.
ziran.sun 2014/01/02 16:03:30 Done.
15 var textarea = document.getElementById("test");
16 textarea.focus();
17
18 //copy a new line
yosin_UTC9 2013/12/20 01:23:06 nit: Please put a space after "//"
ziran.sun 2014/01/02 16:03:30 Done.
19 textarea.setSelectionRange(4, 5);
20 document.execCommand("copy");
21
22 document.execCommand("SelectAll");
23 document.execCommand("paste");
24 shouldBeEqualToString('textarea.value', newlineText);
25
yosin_UTC9 2013/12/20 01:23:06 nit: Please remove an extra blank line.
ziran.sun 2014/01/02 16:03:30 Done.
26 </script>
27 </body>
28 </html>
29
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698