OLD | NEW |
1 <div id="container"> | 1 <div id="container"> |
2 <div id="sample" contenteditable="true"></div> | 2 <div id="sample" contenteditable="true"></div> |
3 </div> | 3 </div> |
4 <script src="../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../fast/js/resources/js-test-pre.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 var selection = window.getSelection(); | 8 var selection = window.getSelection(); |
9 function testIt(sourceHTML, expectedHTML, expectedNode, expectedOffset) | 9 function testIt(sourceHTML, expectedHTML, expectedNode, expectedOffset) |
10 { | 10 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 testIt('a<br><br>|b', 'a<br>b', 'sample.lastChild', 0); | 43 testIt('a<br><br>|b', 'a<br>b', 'sample.lastChild', 0); |
44 testIt('a<br><br><br>|b', 'a<br><br>b', 'sample.lastChild', 0); | 44 testIt('a<br><br><br>|b', 'a<br><br>b', 'sample.lastChild', 0); |
45 | 45 |
46 testIt('a<br>b|', 'a<br><br>', 'sample', 2); | 46 testIt('a<br>b|', 'a<br><br>', 'sample', 2); |
47 testIt('a<br><br>b|', 'a<br><br><br>', 'sample', 3); | 47 testIt('a<br><br>b|', 'a<br><br><br>', 'sample', 3); |
48 testIt('a<br><br><br>b|', 'a<br><br><br><br>', 'sample', 4); | 48 testIt('a<br><br><br>b|', 'a<br><br><br><br>', 'sample', 4); |
49 | 49 |
50 if (window.testRunner) | 50 if (window.testRunner) |
51 $('container').outerHTML = ''; | 51 $('container').outerHTML = ''; |
52 </script> | 52 </script> |
53 <script src="../../fast/js/resources/js-test-post.js"></script> | |
OLD | NEW |