| <html> |
| <head> |
| <script src="../../resources/js-test-pre.js"></script> |
| </head> |
| <body> |
| <script> |
| description("This tests XMLSerializer.serializeToString() on a newly created DocumentType node does not throw since the node has an associated document."); |
| |
| var docType = window.document.implementation.createDocumentType("aDocTypeName", "aPublicID", "aSystemID"); |
| |
| var serializer = new XMLSerializer(); |
| |
| var text; |
| shouldNotThrow("text = serializer.serializeToString(docType)"); |
| shouldBeEqualToString("text", "<!DOCTYPE aDocTypeName PUBLIC \"aPublicID\" \"aSystemID\">"); |
| </script> |
| <script src="../../resources/js-test-pre.js"></script> |
| </body> |
| </html> |