OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>Document.adoptNode</title> |
| 5 <script src="../../../resources/testharness.js"></script> |
| 6 <script src="../../../resources/testharnessreport.js"></script> |
| 7 <link rel="stylesheet" href="../../../resources/testharness.css"> |
| 8 </head> |
| 9 <body> |
| 10 <p>This page tests the DOM document.adoptNode method with DocumentType.</p> |
| 11 <script> |
| 12 test(function() { |
| 13 var doctype = document.doctype; |
| 14 assert_equals(doctype.parentNode, document) |
| 15 assert_equals(doctype.ownerDocument, document) |
| 16 assert_equals(document.adoptNode(doctype), doctype) |
| 17 assert_equals(doctype.parentNode, null) |
| 18 assert_equals(doctype.ownerDocument, document) |
| 19 }, "Explicitly adopting a DocumentType should work.") |
| 20 </script> |
| 21 </body> |
| 22 </html> |
OLD | NEW |