Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: LayoutTests/fast/dom/Document/parent-node-interface.html

Issue 15077006: Implement ParentNode IDL interface (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/parent-node-interface-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/Document/parent-node-interface-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698