OLD | NEW |
---|---|
(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 | |
OLD | NEW |