hyatt@apple.com | 4258307 | 2008-02-20 22:47:57 +0000 | [diff] [blame] | 1 | <!DOCTYPE HTML> |
| 2 | <html > |
| 3 | <head> |
| 4 | <script> |
rniwa@webkit.org | ada3c20 | 2012-06-20 03:28:42 +0000 | [diff] [blame] | 5 | if (window.testRunner) |
| 6 | testRunner.dumpAsText(); |
hyatt@apple.com | 4258307 | 2008-02-20 22:47:57 +0000 | [diff] [blame] | 7 | |
| 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> |