Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / Element / parent-node-interface.html
blob7798f4d3be9e44cd9a033aa759c8bacc9d3f2560
1 <!DOCTYPE html>
2 <body>
3 <script src="../../../resources/js-test.js"></script>
4 <script>
6 description('This tests that Element implements the ParentNode interface.');
8 var element = document.createElementNS('foo', 'element');
10 shouldBe('element.children.length', '0');
11 shouldBe('element.childElementCount', '0');
12 shouldBeNull('element.firstElementChild');
13 shouldBeNull('element.lastElementChild');
15 element.appendChild(new Text('a'));
16 shouldBe('element.children.length', '0');
17 shouldBe('element.childElementCount', '0');
18 shouldBeNull('element.firstElementChild');
19 shouldBeNull('element.lastElementChild');
21 var b = element.appendChild(document.createElement('b'));
22 shouldBe('element.children.length', '1');
23 shouldBe('element.childElementCount', '1');
24 shouldBe('element.children[0]', 'b');
25 shouldBe('element.firstElementChild', 'b');
26 shouldBe('element.lastElementChild', 'b');
28 element.appendChild(new Text('c'));
29 shouldBe('element.children.length', '1');
30 shouldBe('element.childElementCount', '1');
31 shouldBe('element.children[0]', 'b');
32 shouldBe('element.firstElementChild', 'b');
33 shouldBe('element.lastElementChild', 'b');
35 var d = element.appendChild(document.createElement('d'));
36 shouldBe('element.children.length', '2');
37 shouldBe('element.childElementCount', '2');
38 shouldBe('element.children[0]', 'b');
39 shouldBe('element.children[1]', 'd');
40 shouldBe('element.firstElementChild', 'b');
41 shouldBe('element.lastElementChild', 'd');
43 element.appendChild(new Text('e'));
44 shouldBe('element.children.length', '2');
45 shouldBe('element.childElementCount', '2');
46 shouldBe('element.children[0]', 'b');
47 shouldBe('element.children[1]', 'd');
48 shouldBe('element.firstElementChild', 'b');
49 shouldBe('element.lastElementChild', 'd');
51 </script>