7 document
.getElementById('console').appendChild(document
.createTextNode(str
))
12 if (window
.layoutTestController
)
13 layoutTestController
.dumpAsText();
16 // add two docType elements to test handling multiple addition of docTypes, since document has no docType initially
17 document
.appendChild(document
.implementation
.createDocumentType("example", "http://www.example.com/", "myDoc.dtd"));
18 document
.appendChild(document
.implementation
.createDocumentType("example", "http://www.example.com/", "myDoc.dtd"));
19 debug("FAILURE: Did not throw exception and should throw node hierarchy error.");
24 debug("FAILURE: Threw an exception with a code other than 3; should throw node hierarchy error.");
34 <body onload=
"runTest();">
35 This tests that a document only supports having one doctype.
36 If the test is successful, 'SUCCESS' will be displayed below, otherwise 'FAILURE' and a reason will be displayed.
37 <pre id=
"console"></pre>