chromium/third_party/blink/web_tests/fast/doctypes/doctype-after-comment.html

<!-- A comment -->
<!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 after a comment was not ignored.");
            else
                log("FAIL: a doctype after a comment was ignored.");

            if (document.childNodes[1] == document.doctype)
                log("PASS: a doctype after a comment was set as the second element correctly and not moved to be the first child.");
            else
                log("FAIL: a doctype after a comment was not set as the second element correctly.");
        }
    </script>
</head>
<body>
    This tests the behavior of a Doctype after a comment at the beginning of the document..
    <pre id="console"></pre>
</body>
</html>