aboutsummaryrefslogtreecommitdiffstats
path: root/tests/content/test_document_adoptNode.html
diff options
context:
space:
mode:
Diffstat (limited to 'tests/content/test_document_adoptNode.html')
-rw-r--r--tests/content/test_document_adoptNode.html25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/content/test_document_adoptNode.html b/tests/content/test_document_adoptNode.html
new file mode 100644
index 00000000000..eef34b80723
--- /dev/null
+++ b/tests/content/test_document_adoptNode.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <script src="harness.js"></script>
+ <script>
+ let foo = document.getElementById("foo");
+ let doc = document.implementation.createHTMLDocument("title");
+
+ is(foo.ownerDocument, document);
+
+ let adopted_foo = doc.adoptNode(foo);
+ is(document.getElementById("foo"), null);
+
+ is(foo, adopted_foo);
+ is(foo.ownerDocument, doc);
+ is(foo.parentNode, null);
+ is(foo.childNodes.length, 1);
+
+ finish();
+ </script>
+ </head>
+ <body>
+ <div id="foo"><div id="bar"></div></div>
+ </body>
+</html>