Index: LayoutTests/fast/dom/Document/parent-node-interface.html |
diff --git a/LayoutTests/fast/dom/Document/parent-node-interface.html b/LayoutTests/fast/dom/Document/parent-node-interface.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..a7f86a3940ff9cbc6a7d3af2157c23b281e43cf4 |
--- /dev/null |
+++ b/LayoutTests/fast/dom/Document/parent-node-interface.html |
@@ -0,0 +1,36 @@ |
+<!DOCTYPE html> |
+<body> |
+<script src="../../js/resources/js-test-pre.js"></script> |
+<script> |
+ |
+description('This tests that Document implements the ParentNode interface.'); |
+ |
+var doc = document.implementation.createDocument('', null, null); |
+ |
+shouldBe('doc.children.length', '0'); |
+shouldBe('doc.childElementCount', '0'); |
+shouldBeNull('doc.firstElementChild'); |
+shouldBeNull('doc.lastElementChild'); |
+ |
+doc.appendChild(new Comment('a')); |
+shouldBe('doc.children.length', '0'); |
+shouldBe('doc.childElementCount', '0'); |
+shouldBeNull('doc.firstElementChild'); |
+shouldBeNull('doc.lastElementChild'); |
+ |
+var b = doc.appendChild(doc.createElement('b')); |
+shouldBe('doc.children.length', '1'); |
+shouldBe('doc.childElementCount', '1'); |
+shouldBe('doc.children[0]', 'b'); |
+shouldBe('doc.firstElementChild', 'b'); |
+shouldBe('doc.lastElementChild', 'b'); |
+ |
+doc.appendChild(new Comment('c')); |
+shouldBe('doc.children.length', '1'); |
+shouldBe('doc.childElementCount', '1'); |
+shouldBe('doc.children[0]', 'b'); |
+shouldBe('doc.firstElementChild', 'b'); |
+shouldBe('doc.lastElementChild', 'b'); |
+ |
+</script> |
+<script src="../../js/resources/js-test-post.js"></script> |