OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <div id="test1"> | 3 <div id="test1"> |
4 <input id="test2"/> | 4 <input id="test2"/> |
5 <input id="test3"/> | 5 <input id="test3"/> |
6 <ol></ol> | 6 <ol></ol> |
7 </div> | 7 </div> |
8 <script> | 8 <script> |
9 if (window.layoutTestController) | 9 if (window.layoutTestController) |
10 layoutTestController.dumpAsText(); | 10 layoutTestController.dumpAsText(); |
11 | 11 |
12 function runTest() { | 12 function runTest() { |
13 var range = document.createRange(); | 13 var range = document.createRange(); |
14 var test1 = document.getElementById("test1"); | 14 var test1 = document.getElementById("test1"); |
15 var test2 = document.getElementById("test2"); | 15 var test2 = document.getElementById("test2"); |
16 var test3 = document.getElementById("test3"); | 16 var test3 = document.getElementById("test3"); |
17 | 17 |
18 range.setStartBefore(test2); | 18 range.setStartBefore(test2); |
19 range.selectNodeContents(test3); | 19 range.selectNodeContents(test3); |
20 range.setEndAfter(test1); | 20 range.setEndAfter(test1); |
21 range.commonAncestorContainer; | 21 range.commonAncestorContainer; |
22 range.deleteContents(); | 22 range.deleteContents(); |
23 } | 23 } |
24 | 24 |
25 document.addEventListener("DOMSubtreeModified", runTest, true); | 25 document.addEventListener("DOMSubtreeModified", runTest, true); |
26 document.body.appendChild(document.createTextNode("PASS")); | 26 document.body.appendChild(document.createTextNode("PASS")); |
27 </script> | 27 </script> |
28 </html> | 28 </html> |
OLD | NEW |