1 <!DOCTYPE HtMl PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
2 "http://www.w3.org/TR/html4/loose.dtd">
5 <meta http-equiv="content-type" content="text/html; charset=utf-8">
6 <title>DocType Case Insensitivity</title>
9 <script type="text/javascript" language="javascript">
12 if (window.layoutTestController)
13 layoutTestController.dumpAsText();
17 var output = document.doctype.name + ", " + document.doctype.publicId + ", " + document.doctype.systemId;
19 var expected = "HtMl, -//W3C//DTD HTML 4.01 Transitional//EN, http://www.w3.org/TR/html4/loose.dtd";
21 if (output == expected)
23 document.write("<span style='color:green'>");
24 document.write("SUCCESS - This document has a doctype and each component has the correct case<br><br>");
25 document.write("name = " + document.doctype.name + "<br>");
26 document.write("publicId = " + document.doctype.publicId + "<br>");
27 document.write("systemId = " + document.doctype.systemId);
31 document.write("<span style='color:red'>");
32 document.write("FAILED - This document has a doctype, but one or more components has the wrong case<br><br>");
33 document.write("name = " + document.doctype.name + " (should be HtMl)" + "<br>");
34 document.write("publicId = " + document.doctype.publicId + " (should be -//W3C//DTD HTML 4.01 Transitional//EN)" + "<br>");
35 document.write("systemId = " + document.doctype.systemId + " (should be http://www.w3.org/TR/html4/loose.dtd)");
40 document.write("FAILED - doctype is null even though there is a <!DOCTYPE ...> declaration");