createDocument tests modeled after mozilla's testing On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS document.implementation.createDocumentType('foo') threw exception TypeError: Not enough arguments. PASS document.implementation.createDocumentType('foo', null) threw exception TypeError: Not enough arguments. PASS exceptionThrown.name is "TypeError" PASS exceptionThrown.name is "TypeError" PASS exceptionThrown.name is "TypeError" PASS createDocumentType(, , null) PASS exceptionThrown.name is "TypeError" PASS createDocumentType(null, null, null) PASS exceptionThrown.name is "TypeError" PASS exceptionThrown.name is "TypeError" PASS exceptionThrown.name is "TypeError" PASS createDocumentType("a:", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType(":foo", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType(":", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType("foo", null, null) PASS createDocumentType("foo:bar", null, null) PASS createDocumentType("foo::bar", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType(" :bar", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType("foo: ", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType("foo :bar", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType("foo: bar", null, null); threw INVALID_CHARACTER_ERR PASS createDocumentType("a:b:c", null, null); valid XML name, invalid QName; threw INVALID_CHARACTER_ERR PASS successfullyParsed is true TEST COMPLETE