OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#dom-domimpleme
ntation-createdocumenttype"> | 4 <link rel="help" href="http://www.w3.org/TR/2012/WD-dom-20121206/#dom-domimpleme
ntation-createdocumenttype"> |
5 <script src="../js/resources/js-test-pre.js"></script> | 5 <script src="../js/resources/js-test-pre.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <script> | 8 <script> |
9 description("Tests that DOMImplementation.createDocumentType() properly sets the
node's document to the associated document of the context object."); | 9 description("Tests that DOMImplementation.createDocumentType() properly sets the
node's document to the associated document of the context object."); |
10 var docType = document.implementation.createDocumentType("html", null, null); | 10 var docType = document.implementation.createDocumentType("html", null, null); |
11 shouldBe("docType.ownerDocument", "document"); | 11 shouldBe("docType.ownerDocument", "document"); |
12 var newDocument; | 12 var newDocument; |
13 shouldNotThrow("newDocument = document.implementation.createDocument('', null, d
ocType)"); | 13 shouldNotThrow("newDocument = document.implementation.createDocument('', null, d
ocType)"); |
14 shouldBe("newDocument.doctype", "docType"); | 14 shouldBe("newDocument.doctype", "docType"); |
15 shouldBe("newDocument.doctype.ownerDocument", "newDocument"); | 15 shouldBe("newDocument.doctype.ownerDocument", "newDocument"); |
16 | 16 |
17 </script> | 17 </script> |
18 <script src="../js/resources/js-test-post.js"></script> | |
19 </body> | 18 </body> |
20 </html> | 19 </html> |
OLD | NEW |