blob: 4b0f6d8f183340cc456c1ee4740d4bf8586a6ee1 [file] [log] [blame]
<html>
<head>
<title>This tests XMLSerializer.serializeToString() on a newly created DocumentType node does not throw since the node has an associated document</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
</head>
<body>
<script>
var docType = window.document.implementation.createDocumentType("aDocTypeName", "aPublicID", "aSystemID");
var serializer = new XMLSerializer();
var text;
try {
text = serializer.serializeToString(docType);
} catch (e) {
assert_unreached('Should not throw exception');
}
assert_equals(text, "<!DOCTYPE aDocTypeName PUBLIC \"aPublicID\" \"aSystemID\">");
done();
</script>
</body>
</html>