<!DOCTYPE HTML> | |
<html > | |
<head> | |
<script> | |
if (window.testRunner) | |
testRunner.dumpAsText(); | |
log = function(msg) | |
{ | |
document.getElementById('console').appendChild(document.createTextNode(msg + "\n")); | |
} | |
onload = function() | |
{ | |
if (document.doctype) | |
log("PASS: a doctype in a HTML document is not ignored."); | |
else | |
log("FAIL: a doctype in a HTML document is ignored."); | |
if (document.firstChild == document.doctype) | |
log("PASS: a doctype in an HTML document is correctly set to the first child of the Document."); | |
else | |
log("FAIL: a doctype in an HTML document is not correctly set to the first child of the Document."); | |
} | |
</script> | |
</head> | |
<body> | |
This tests the behavior of a Doctype in a HTML document. | |
<pre id="console"></pre> | |
</body> | |
</html> |