OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../../resources/js-test.js"></script> |
4 <script> | 4 <script> |
5 | 5 |
6 description('This tests that Document implements the ParentNode interface.'); | 6 description('This tests that Document implements the ParentNode interface.'); |
7 | 7 |
8 var doc = document.implementation.createDocument('', null, null); | 8 var doc = document.implementation.createDocument('', null, null); |
9 | 9 |
10 shouldBe('doc.children.length', '0'); | 10 shouldBe('doc.children.length', '0'); |
11 shouldBe('doc.childElementCount', '0'); | 11 shouldBe('doc.childElementCount', '0'); |
12 shouldBeNull('doc.firstElementChild'); | 12 shouldBeNull('doc.firstElementChild'); |
13 shouldBeNull('doc.lastElementChild'); | 13 shouldBeNull('doc.lastElementChild'); |
(...skipping 12 matching lines...) Expand all Loading... |
26 shouldBe('doc.lastElementChild', 'b'); | 26 shouldBe('doc.lastElementChild', 'b'); |
27 | 27 |
28 doc.appendChild(new Comment('c')); | 28 doc.appendChild(new Comment('c')); |
29 shouldBe('doc.children.length', '1'); | 29 shouldBe('doc.children.length', '1'); |
30 shouldBe('doc.childElementCount', '1'); | 30 shouldBe('doc.childElementCount', '1'); |
31 shouldBe('doc.children[0]', 'b'); | 31 shouldBe('doc.children[0]', 'b'); |
32 shouldBe('doc.firstElementChild', 'b'); | 32 shouldBe('doc.firstElementChild', 'b'); |
33 shouldBe('doc.lastElementChild', 'b'); | 33 shouldBe('doc.lastElementChild', 'b'); |
34 | 34 |
35 </script> | 35 </script> |
OLD | NEW |