blob: 68be0c5512de7be720498b3b73f3679396e2c85d [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description("Test that the parameters to DOMImplementation.createDocumentType() are mandatory and non-nullable");
// Parameters should be mandatory.
shouldThrow("document.implementation.createDocumentType()");
shouldThrow("document.implementation.createDocumentType('a')");
shouldThrow("document.implementation.createDocumentType('a', '')");
// Parameters should not be nullable.
shouldNotThrow("docType = document.implementation.createDocumentType(null, null, null)");
shouldBeEqualToString("docType.name", "null");
shouldBeEqualToString("docType.nodeName", "null");
shouldBeEqualToString("docType.publicId", "null");
shouldBeEqualToString("docType.systemId", "null");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>