Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Document / parent-node-interface.html
blobdf5fa64c99c2d0199e113fbc776301ba64d2a406
1 <!DOCTYPE html>
2 <body>
3 <script src="../../../resources/js-test.js"></script>
4 <script>
6 description('This tests that Document implements the ParentNode interface.');
8 var doc = document.implementation.createDocument('', null, null);
10 shouldBe('doc.children.length', '0');
11 shouldBe('doc.childElementCount', '0');
12 shouldBeNull('doc.firstElementChild');
13 shouldBeNull('doc.lastElementChild');
15 doc.appendChild(new Comment('a'));
16 shouldBe('doc.children.length', '0');
17 shouldBe('doc.childElementCount', '0');
18 shouldBeNull('doc.firstElementChild');
19 shouldBeNull('doc.lastElementChild');
21 var b = doc.appendChild(doc.createElement('b'));
22 shouldBe('doc.children.length', '1');
23 shouldBe('doc.childElementCount', '1');
24 shouldBe('doc.children[0]', 'b');
25 shouldBe('doc.firstElementChild', 'b');
26 shouldBe('doc.lastElementChild', 'b');
28 doc.appendChild(new Comment('c'));
29 shouldBe('doc.children.length', '1');
30 shouldBe('doc.childElementCount', '1');
31 shouldBe('doc.children[0]', 'b');
32 shouldBe('doc.firstElementChild', 'b');
33 shouldBe('doc.lastElementChild', 'b');
35 </script>