8047300: update tools/javadoc/6227454 test for missing <DOCTYPE> tags

Reviewed-by: jjg, ksrini
This commit is contained in:
Sonali Goel 2014-06-20 13:26:24 -07:00
parent 1ff4245739
commit ae6f87cc24

View file

@ -38,15 +38,17 @@ public class Test extends Doclet {
}
void run() throws Exception {
test("<html><body>ABC XYZ</body></html>");
test("<html><body>ABC XYZ</BODY></html>");
test("<html><BODY>ABC XYZ</body></html>");
test("<html><BODY>ABC XYZ</BODY></html>");
test("<html><BoDy>ABC XYZ</bOdY></html>");
test("<html> ABC XYZ</bOdY></html>", "Body tag missing from HTML");
test("<html><body>ABC XYZ </html>", "Close body tag missing from HTML");
test("<html> ABC XYZ </html>", "Body tag missing from HTML");
test("<html><body>ABC" + bigText(8192, 40) + "XYZ</body></html>");
String docType = "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" "
+ "\"http://www.w3.org/TR/html4/loose.dtd\">";
test(docType+"<html><body>ABC XYZ</body></html>");
test(docType+"<html><body>ABC XYZ</BODY></html>");
test(docType+"<html><BODY>ABC XYZ</body></html>");
test(docType+"<html><BODY>ABC XYZ</BODY></html>");
test(docType+"<html><BoDy>ABC XYZ</bOdY></html>");
test(docType+"<html> ABC XYZ</bOdY></html>", "Body tag missing from HTML");
test(docType+"<html><body>ABC XYZ </html>", "Close body tag missing from HTML");
test(docType+"<html> ABC XYZ </html>", "Body tag missing from HTML");
test(docType+"<html><body>ABC" + bigText(8192, 40) + "XYZ</body></html>");
if (errors > 0)
throw new Exception(errors + " errors occurred");