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

Unified Diff: LayoutTests/fast/dom/DocumentType/clone-node.html

Issue 102533002: Implemented DocumentType.cloneNode(bool) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: addressed review issues Created 7 years 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/DocumentType/clone-node-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/dom/DocumentType/clone-node.html
diff --git a/LayoutTests/fast/dom/DocumentType/clone-node.html b/LayoutTests/fast/dom/DocumentType/clone-node.html
new file mode 100644
index 0000000000000000000000000000000000000000..7ea4df9cc1360482e55704c0f3a7817a615158f1
--- /dev/null
+++ b/LayoutTests/fast/dom/DocumentType/clone-node.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<title>DocumentType.cloneNode()</title>
+<link rel="help" href="http://dom.spec.whatwg.org/#dom-node-clonenode">
+<script src="../../../resources/js-test.js"></script>
+<script>
+description('Tests cloneNode for DocumentType.');
+
+shouldBeNonNull("document.doctype");
+shouldBe("document.doctype.parentNode", "document");
+
+var cd = document.doctype.cloneNode(false);
+shouldBeNonNull("cd");
+shouldBe("cd.publicId", "document.doctype.publicId");
+shouldBe("cd.systemId", "document.doctype.systemId");
+shouldBe("cd.parentNode", "null");
+shouldBe("cd.ownerDocument", "document");
+
+var doc = document.implementation.createDocument(null, null, null);
+cd = doc.importNode(cd, true);
+
+shouldBe("cd.publicId", "document.doctype.publicId");
+shouldBe("cd.systemId", "document.doctype.systemId");
+shouldBe("cd.parentNode", "null");
+shouldBe("cd.ownerDocument", "doc");
+doc.appendChild(cd);
+shouldBe("cd.parentNode", "doc");
+
+var cd = document.implementation.createDocumentType(
+ "a", "b", "c").cloneNode(false);
+shouldBe("cd.name", "'a'");
+shouldBe("cd.publicId", "'b'");
+shouldBe("cd.systemId", "'c'");
+shouldBe("cd.parentNode", "null");
+shouldBe("cd.ownerDocument", "document");
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DocumentType/clone-node-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698