OLD | NEW |
1 <div id="container"> | 1 <div id="container"> |
2 <p id="description"></p> | 2 <p id="description"></p> |
3 <div id="sample" contenteditable="true"> | 3 <div id="sample" contenteditable="true"> |
4 <ul> | 4 <ul> |
5 <li><p>This</p></li> | 5 <li><p>This</p></li> |
6 <li><p>is</p></li> | 6 <li><p>is</p></li> |
7 <li><p>a</p></li> | 7 <li><p>a</p></li> |
8 <li><p>list</p></li> | 8 <li><p>list</p></li> |
9 </ul> | 9 </ul> |
10 </div> | 10 </div> |
11 </div> | 11 </div> |
12 <script src="../../fast/js/resources/js-test-pre.js"></script> | 12 <script src="../../resources/js-test.js"></script> |
13 <script> | 13 <script> |
14 function $(id) { return document.getElementById(id); } | 14 function $(id) { return document.getElementById(id); } |
15 | 15 |
16 var actualHTML; | 16 var actualHTML; |
17 var selection = getSelection(); | 17 var selection = getSelection(); |
18 | 18 |
19 function testIt(nth, message, expectedText, expectedHTML, initRange, getResult) | 19 function testIt(nth, message, expectedText, expectedHTML, initRange, getResult) |
20 { | 20 { |
21 var listItem = $('sample').querySelectorAll('li')[nth]; | 21 var listItem = $('sample').querySelectorAll('li')[nth]; |
22 var range = document.createRange(); | 22 var range = document.createRange(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 var textNode = listChild.firstChild.firstChild; | 58 var textNode = listChild.firstChild.firstChild; |
59 range.setStart(textNode, 1); | 59 range.setStart(textNode, 1); |
60 }, | 60 }, |
61 function(listItem) { | 61 function(listItem) { |
62 return listItem.nextElementSibling; | 62 return listItem.nextElementSibling; |
63 }); | 63 }); |
64 | 64 |
65 if (window.testRunner) | 65 if (window.testRunner) |
66 $('container').outerHTML = ''; | 66 $('container').outerHTML = ''; |
67 </script> | 67 </script> |
OLD | NEW |