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

Side by Side Diff: LayoutTests/editing/deleting/delete-character-002.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 <div id="container"> 1 <div id="container">
2 <textarea id="sample"></textarea> 2 <textarea id="sample"></textarea>
3 </div> 3 </div>
4 <script src="../../fast/js/resources/js-test-pre.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 <script> 5 <script>
6 function $(id) { return document.getElementById(id); } 6 function $(id) { return document.getElementById(id); }
7 var sample = $('sample'); 7 var sample = $('sample');
8 8
9 function testIt(source, expectedText, expectedOffset) 9 function testIt(source, expectedText, expectedOffset)
10 { 10 {
11 var caretPos = source.indexOf('|'); 11 var caretPos = source.indexOf('|');
12 sample.value = source.substring(0, caretPos) + source.substring(caretPos + 1 ); 12 sample.value = source.substring(0, caretPos) + source.substring(caretPos + 1 );
13 sample.setSelectionRange(caretPos, caretPos); 13 sample.setSelectionRange(caretPos, caretPos);
14 sample.focus(); 14 sample.focus();
(...skipping 20 matching lines...) Expand all
35 testIt('a\n\n|b', 'a\nb', 2); 35 testIt('a\n\n|b', 'a\nb', 2);
36 testIt('a\n\n\n|b', 'a\n\nb', 3); 36 testIt('a\n\n\n|b', 'a\n\nb', 3);
37 37
38 testIt('a\nb|', 'a\n', 2); 38 testIt('a\nb|', 'a\n', 2);
39 testIt('a\n\nb|', 'a\n\n', 3); 39 testIt('a\n\nb|', 'a\n\n', 3);
40 testIt('a\n\n\nb|', 'a\n\n\n', 4); 40 testIt('a\n\n\nb|', 'a\n\n\n', 4);
41 41
42 if (window.testRunner) 42 if (window.testRunner)
43 $('container').outerHTML = ''; 43 $('container').outerHTML = '';
44 </script> 44 </script>
OLDNEW
« no previous file with comments | « LayoutTests/editing/deleting/delete-br-after-image.html ('k') | LayoutTests/editing/deleting/delete-character-003.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698