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

Side by Side Diff: LayoutTests/editing/pasteboard/copy-paste-first-line-in-textarea.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <textarea cols=50 rows=10>first 4 <textarea cols=50 rows=10>first
5 second</textarea> 5 second</textarea>
6 <script src="../../fast/js/resources/js-test-pre.js"></script> 6 <script src="../../resources/js-test.js"></script>
7 <p id="console"></p> 7 <p id="console"></p>
8 <script> 8 <script>
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 14
15 function selectFirstLineIncludingLineBreak() { 15 function selectFirstLineIncludingLineBreak() {
16 textarea.focus(); 16 textarea.focus();
17 textarea.setSelectionRange(0, 0); 17 textarea.setSelectionRange(0, 0);
18 getSelection().modify('extend', 'forward', 'line'); 18 getSelection().modify('extend', 'forward', 'line');
19 } 19 }
20 20
21 function copyPaste() { 21 function copyPaste() {
22 document.execCommand('copy'); 22 document.execCommand('copy');
23 document.execCommand('paste'); 23 document.execCommand('paste');
24 } 24 }
25 25
26 var offsetAfterLineBreak = 6; 26 var offsetAfterLineBreak = 6;
27 shouldBe("selectFirstLineIncludingLineBreak(); copyPaste(); textarea.selectionEn d", "offsetAfterLineBreak"); 27 shouldBe("selectFirstLineIncludingLineBreak(); copyPaste(); textarea.selectionEn d", "offsetAfterLineBreak");
28 28
29 </script> 29 </script>
30 </body> 30 </body>
31 </html> 31 </html>
OLDNEW
« no previous file with comments | « LayoutTests/editing/pasteboard/copy-in-password-field.html ('k') | LayoutTests/editing/pasteboard/copy-paste-ruby-text.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698