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