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

Unified Diff: LayoutTests/fast/dom/createDocumentType-ownerDocument.html

Issue 22880019: [DOM4] Doctypes now always have a node document and can be moved across document boundaries (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Improve tests Created 7 years, 4 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
Index: LayoutTests/fast/dom/createDocumentType-ownerDocument.html
diff --git a/LayoutTests/fast/dom/createDocumentType-ownerDocument.html b/LayoutTests/fast/dom/createDocumentType-ownerDocument.html
new file mode 100644
index 0000000000000000000000000000000000000000..ace9cce206b872bbe085b5a44e15a132e1a06dde
--- /dev/null
+++ b/LayoutTests/fast/dom/createDocumentType-ownerDocument.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#dom-domimplementation-createdocumenttype">
+<script src="../js/resources/js-test-pre.js"></script>
+</head>
+<body>
+<script>
+description("Tests that DOMImplementation.createDocumentType() properly sets the node's document to the associated document of the context object.");
+var docType = document.implementation.createDocumentType("html", null, null);
+shouldBe("docType.ownerDocument", "document");
+var newDocument;
+shouldNotThrow("newDocument = document.implementation.createDocument('', null, docType)");
+shouldBe("newDocument.doctype", "docType");
+shouldBe("newDocument.doctype.ownerDocument", "newDocument");
+
+</script>
+<script src="../js/resources/js-test-post.js"></script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698