OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE HTML> |
| 2 <html> |
| 3 <body> |
| 4 <script src="../../resources/js-test.js"></script> |
| 5 |
| 6 <div id="div" contenteditable="true">hello</div> |
| 7 <script> |
| 8 description("Ensure that collapse with null clears selection"); |
| 9 |
| 10 var selection = getSelection(); |
| 11 selection.selectAllChildren(div); |
| 12 selection.rangeCount |
| 13 shouldBe("selection.rangeCount", "1"); |
| 14 selection.collapse(null); |
| 15 shouldBe("selection.rangeCount", "0"); |
| 16 selection.collapse(div.firstChild, 2); |
| 17 shouldBe("selection.rangeCount", "1"); |
| 18 selection.collapse(null); |
| 19 shouldBe("selection.rangeCount", "0"); |
| 20 </script> |
| 21 |
| 22 </body> |
| 23 </html> |
OLD | NEW |