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

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: 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
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..7719d7cce321018cfd33df152a36f032266099d2
--- /dev/null
+++ b/LayoutTests/fast/dom/DocumentType/clone-node.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html><head><title>DocumentType.cloneNode()</title>
+<link rel="help" href="http://dom.spec.whatwg.org/#dom-node-clonenode">
esprehn 2013/12/09 17:19:08 Just leave out the <html>, <head> and <body>. You
+</head><body>
+<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><script src="../../../resources/js-test-post.js"></script></body>
esprehn 2013/12/09 17:19:08 post.js does nothing now, remove that
« no previous file with comments | « no previous file | LayoutTests/fast/dom/DocumentType/clone-node-expected.txt » ('j') | Source/core/dom/Document.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698