8047300: update tools/javadoc/6227454 test for missing <DOCTYPE> tags
authorsogoel
Fri, 20 Jun 2014 13:26:24 -0700
changeset 25280 687ed8b6d77b
parent 25279 a665d5cbb8c3
child 25281 0babd05cbcd3
child 25304 bcded82f87a7
8047300: update tools/javadoc/6227454 test for missing <DOCTYPE> tags Reviewed-by: jjg, ksrini
langtools/test/tools/javadoc/6227454/Test.java
--- a/langtools/test/tools/javadoc/6227454/Test.java	Fri Jun 20 20:36:54 2014 +0100
+++ b/langtools/test/tools/javadoc/6227454/Test.java	Fri Jun 20 13:26:24 2014 -0700
@@ -38,15 +38,17 @@
     }
 
     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");