5 li
= document
.createElement('li');
6 li
.appendChild(document
.createTextNode(str
));
7 document
.getElementById('console').appendChild(li
);
11 if (window
.layoutTestController
)
12 layoutTestController
.dumpAsText();
14 var docType
= window
.document
.implementation
.createDocumentType("aDocTypeName", "aPublicID", "aSystemID");
16 var serializer
= new XMLSerializer();
19 var text
= serializer
.serializeToString(docType
);
20 debug("FAIL: XMLSerializer.serializeToString() should throw an exception if it tries to serialize a documentless DocumentType node.");
22 if (e
== "Error: INVALID_ACCESS_ERR: DOM Exception 15")
23 debug("PASS: an " + e
+ " was thrown as expected.")
25 debug("FAIL: XMLSerializer.serializeToString() should throw an INVALID_ACCESS_ERR DOMExeption if it tries to serialize a documentless DocumentType node.");
30 <body onload=
"runTests()">
31 This tests XMLSerializer.serializeToString() on a DocumentType node that does not have a document associated
32 with it. It should throw an INVALID_ACCESS_ERR DOMException.