blob: 229d1501971238425ce82153a6213c693aa3c13d [file] [log] [blame]
hyatt@apple.com42583072008-02-20 22:47:57 +00001<!DOCTYPE HTML>
2<html >
3<head>
4 <script>
rniwa@webkit.orgada3c202012-06-20 03:28:42 +00005 if (window.testRunner)
6 testRunner.dumpAsText();
hyatt@apple.com42583072008-02-20 22:47:57 +00007
8 log = function(msg)
9 {
10 document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
11 }
12
13 onload = function()
14 {
15 if (document.doctype)
16 log("PASS: a doctype in a HTML document is not ignored.");
17 else
18 log("FAIL: a doctype in a HTML document is ignored.");
19
20 if (document.firstChild == document.doctype)
21 log("PASS: a doctype in an HTML document is correctly set to the first child of the Document.");
22 else
23 log("FAIL: a doctype in an HTML document is not correctly set to the first child of the Document.");
24 }
25 </script>
26</head>
27<body>
28 This tests the behavior of a Doctype in a HTML document.
29 <pre id="console"></pre>
30</body>
31</html>