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

Unified Diff: LayoutTests/fast/dom/Document/adopt-node-with-doctype.html

Issue 364173005: Document.adoptNode should not throw an exception for DocumentType argument (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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/Document/adopt-node-with-doctype.html
diff --git a/LayoutTests/fast/dom/Document/adopt-node-with-doctype.html b/LayoutTests/fast/dom/Document/adopt-node-with-doctype.html
new file mode 100644
index 0000000000000000000000000000000000000000..b115d84e93f4fe3619b77d8cd1b63a46a92f0d13
--- /dev/null
+++ b/LayoutTests/fast/dom/Document/adopt-node-with-doctype.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>Document.adoptNode</title>
+<script src="../../../resources/testharness.js"></script>
+<script src="../../../resources/testharnessreport.js"></script>
+<link rel="stylesheet" href="../../../resources/testharness.css">
+</head>
+<body>
+<p>This page tests the DOM document.adoptNode method with DocumentType.</p>
+<script>
+test(function() {
+ var doctype = document.doctype;
+ assert_equals(doctype.parentNode, document)
+ assert_equals(doctype.ownerDocument, document)
+ assert_equals(document.adoptNode(doctype), doctype)
+ assert_equals(doctype.parentNode, null)
+ assert_equals(doctype.ownerDocument, document)
+}, "Explicitly adopting a DocumentType should work.")
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698