changeset 3419:db0bca6feeb2

8047300: update tools/javadoc/6227454 test for missing <DOCTYPE> tags Reviewed-by: jjg, ksrini
author sogoel
date Fri, 20 Jun 2014 13:26:24 -0700
parents 6c8c530a1b1b
children 97731dc59ef6 b7a5cbf1090e
files test/tools/javadoc/6227454/Test.java
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javadoc/6227454/Test.java	Fri Jun 20 20:36:54 2014 +0100
+++ b/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");