5 li
= document
.createElement('li');
6 li
.appendChild(document
.createTextNode(str
));
7 document
.getElementById('console').appendChild(li
);
11 if (window
.layoutTestController
) {
12 layoutTestController
.dumpAsText();
15 var docType
= window
.document
.implementation
.createDocumentType("aDocTypeName", "aPublicID", "aSystemID");
16 var doc
= window
.document
.implementation
.createDocument("", "", docType
);
18 var serializer
= new XMLSerializer();
20 var result
= serializer
.serializeToString(docType
);
21 if (result
== '<!DOCTYPE aDocTypeName PUBLIC "aPublicID" "aSystemID">')
22 debug('PASS: the DocumentType node has been successfully serialize to "' + result
+ '".');
24 debug('FAIL: the DocumentType node has not been successfully serialized.');
28 <body onload=
"runTests()">
29 This tests XMLSerializer.serializeToString() on a DocumentType node that has a document associated with it.