OLD | NEW |
1 description("Test to check if setBaseAndExtent guard node with null owner docume
nt (Bug 31680)"); | 1 description("Test to check if setBaseAndExtent guard node with null owner docume
nt (Bug 31680)"); |
2 | 2 |
3 var sel = window.getSelection(); | 3 var sel = window.getSelection(); |
4 var docType = document.implementation.createDocumentType('c'); | 4 var docType = document.implementation.createDocumentType('c', null, null); |
5 | 5 |
6 sel.setBaseAndExtent(docType); | 6 sel.setBaseAndExtent(docType); |
7 shouldBeNull("sel.anchorNode"); | 7 shouldBeNull("sel.anchorNode"); |
8 | 8 |
9 sel.setBaseAndExtent(null, 0, docType, 0); | 9 sel.setBaseAndExtent(null, 0, docType, 0); |
10 shouldBeNull("sel.anchorNode"); | 10 shouldBeNull("sel.anchorNode"); |
11 | 11 |
12 sel.collapse(docType); | 12 sel.collapse(docType); |
13 shouldBeNull("sel.anchorNode"); | 13 shouldBeNull("sel.anchorNode"); |
14 | 14 |
15 sel.selectAllChildren(docType); | 15 sel.selectAllChildren(docType); |
16 shouldBeNull("sel.anchorNode"); | 16 shouldBeNull("sel.anchorNode"); |
17 | 17 |
18 sel.extend(docType, 0); | 18 sel.extend(docType, 0); |
19 shouldBeNull("sel.anchorNode"); | 19 shouldBeNull("sel.anchorNode"); |
20 | 20 |
21 sel.containsNode(docType); | 21 sel.containsNode(docType); |
22 shouldBeNull("sel.anchorNode"); | 22 shouldBeNull("sel.anchorNode"); |
23 | 23 |
24 shouldBeFalse("sel.containsNode(docType)"); | 24 shouldBeFalse("sel.containsNode(docType)"); |
25 | 25 |
26 var successfullyParsed = true; | 26 var successfullyParsed = true; |
OLD | NEW |