langtools/test/jdk/javadoc/doclet/testHtmlVersion/TestHtmlVersion.java
changeset 36526 3b41f1c69604
parent 36270 8ed6e67460be
child 41453 5429549751ad
equal deleted inserted replaced
36525:4caf88912b7f 36526:3b41f1c69604
    21  * questions.
    21  * questions.
    22  */
    22  */
    23 
    23 
    24 /*
    24 /*
    25  * @test
    25  * @test
    26  * @bug 8072945 8081854 8141492 8148985
    26  * @bug 8072945 8081854 8141492 8148985 8150188
    27  * @summary Test the version of HTML generated by the javadoc tool.
    27  * @summary Test the version of HTML generated by the javadoc tool.
    28  * @author bpatel
    28  * @author bpatel
    29  * @library ../lib
    29  * @library ../lib
    30  * @modules jdk.javadoc
    30  * @modules jdk.javadoc/jdk.javadoc.internal.tool
    31  * @build JavadocTester
    31  * @build JavadocTester
    32  * @run main TestHtmlVersion
    32  * @run main TestHtmlVersion
    33  */
    33  */
    34 
    34 
    35 public class TestHtmlVersion extends JavadocTester {
    35 public class TestHtmlVersion extends JavadocTester {
   693                 "<a name=\"navbar.top.firstrow\">\n"
   693                 "<a name=\"navbar.top.firstrow\">\n"
   694                 + "<!--   -->\n"
   694                 + "<!--   -->\n"
   695                 + "</a>",
   695                 + "</a>",
   696                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   696                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   697                 + "</div>\n"
   697                 + "</div>\n"
       
   698                 + "<div class=\"navPadding\">&nbsp;</div>\n"
   698                 + "<div class=\"header\">",
   699                 + "<div class=\"header\">",
   699                 "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
   700                 "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
   700 
   701 
   701         // Negated test for deprecated-list page
   702         // Negated test for deprecated-list page
   702         checkOutput("deprecated-list.html", false,
   703         checkOutput("deprecated-list.html", false,
   705                 "<a name=\"navbar.top.firstrow\">\n"
   706                 "<a name=\"navbar.top.firstrow\">\n"
   706                 + "<!--   -->\n"
   707                 + "<!--   -->\n"
   707                 + "</a>",
   708                 + "</a>",
   708                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   709                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   709                 + "</div>\n"
   710                 + "</div>\n"
       
   711                 + "<div class=\"navPadding\">&nbsp;</div>\n"
   710                 + "<div class=\"header\">\n"
   712                 + "<div class=\"header\">\n"
   711                 + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
   713                 + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
   712                 + "<h2 title=\"Contents\">Contents</h2>",
   714                 + "<h2 title=\"Contents\">Contents</h2>",
   713                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
   715                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
   714                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
   716                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
   728                 "<a name=\"navbar.top.firstrow\">\n"
   730                 "<a name=\"navbar.top.firstrow\">\n"
   729                 + "<!--   -->\n"
   731                 + "<!--   -->\n"
   730                 + "</a>",
   732                 + "</a>",
   731                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   733                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   732                 + "</div>\n"
   734                 + "</div>\n"
       
   735                 + "<div class=\"navPadding\">&nbsp;</div>\n"
   733                 + "<div class=\"header\">",
   736                 + "<div class=\"header\">",
   734                 "<li class=\"blockList\">\n"
   737                 "<li class=\"blockList\">\n"
   735                 + "<h2 title=\"Package\">Package&nbsp;pkg</h2>");
   738                 + "<h2 title=\"Package\">Package&nbsp;pkg</h2>");
   736 
   739 
   737         // Negated test for overview-tree page
   740         // Negated test for overview-tree page
   741                 "<a name=\"navbar.top.firstrow\">\n"
   744                 "<a name=\"navbar.top.firstrow\">\n"
   742                 + "<!--   -->\n"
   745                 + "<!--   -->\n"
   743                 + "</a>",
   746                 + "</a>",
   744                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   747                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   745                 + "</div>\n"
   748                 + "</div>\n"
       
   749                 + "<div class=\"navPadding\">&nbsp;</div>\n"
   746                 + "<div class=\"header\">",
   750                 + "<div class=\"header\">",
   747                 "<div class=\"contentContainer\">\n"
   751                 "<div class=\"contentContainer\">\n"
   748                 + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
   752                 + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
   749                 "</ul>\n"
   753                 "</ul>\n"
   750                 + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
   754                 + "<h2 title=\"Interface Hierarchy\">Interface Hierarchy</h2>",
   758                 "<a name=\"navbar.top.firstrow\">\n"
   762                 "<a name=\"navbar.top.firstrow\">\n"
   759                 + "<!--   -->\n"
   763                 + "<!--   -->\n"
   760                 + "</a>",
   764                 + "</a>",
   761                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   765                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   762                 + "</div>\n"
   766                 + "</div>\n"
       
   767                 + "<div class=\"navPadding\">&nbsp;</div>\n"
   763                 + "<div class=\"contentContainer\">");
   768                 + "<div class=\"contentContainer\">");
   764 
   769 
   765         // Negated test for src-html page
   770         // Negated test for src-html page
   766         checkOutput("src-html/pkg/AnotherClass.html", false,
   771         checkOutput("src-html/pkg/AnotherClass.html", false,
   767                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
   772                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
   775                 "<a name=\"navbar.top.firstrow\">\n"
   780                 "<a name=\"navbar.top.firstrow\">\n"
   776                 + "<!--   -->\n"
   781                 + "<!--   -->\n"
   777                 + "</a>",
   782                 + "</a>",
   778                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   783                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   779                 + "</div>\n"
   784                 + "</div>\n"
       
   785                 + "<div class=\"navPadding\">&nbsp;</div>\n"
   780                 + "<div class=\"header\">",
   786                 + "<div class=\"header\">",
   781                 "<ul class=\"blockList\">\n"
   787                 "<ul class=\"blockList\">\n"
   782                 + "<li class=\"blockList\">\n"
   788                 + "<li class=\"blockList\">\n"
   783                 + "<h2>Overview</h2>",
   789                 + "<h2>Overview</h2>",
   784                 "<li class=\"blockList\">\n"
   790                 "<li class=\"blockList\">\n"
   982                 "<a name=\"navbar.top.firstrow\">\n"
   988                 "<a name=\"navbar.top.firstrow\">\n"
   983                 + "<!--   -->\n"
   989                 + "<!--   -->\n"
   984                 + "</a>",
   990                 + "</a>",
   985                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   991                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
   986                 + "</div>\n"
   992                 + "</div>\n"
       
   993                 + "<div class=\"navPadding\">&nbsp;</div>\n"
   987                 + "<div class=\"header\">",
   994                 + "<div class=\"header\">",
   988                 "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
   995                 "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
   989                 "<li class=\"blockList\"><a name=\"pkg\">\n"
   996                 "<li class=\"blockList\"><a name=\"pkg\">\n"
   990                 + "<!--   -->\n"
   997                 + "<!--   -->\n"
   991                 + "</a>\n"
   998                 + "</a>\n"
  1085                 "<a name=\"navbar.top.firstrow\">\n"
  1092                 "<a name=\"navbar.top.firstrow\">\n"
  1086                 + "<!--   -->\n"
  1093                 + "<!--   -->\n"
  1087                 + "</a>",
  1094                 + "</a>",
  1088                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1095                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1089                 + "</div>\n"
  1096                 + "</div>\n"
       
  1097                 + "<div class=\"navPadding\">&nbsp;</div>\n"
  1090                 + "<div class=\"header\">",
  1098                 + "<div class=\"header\">",
  1091                 "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
  1099                 "<table class=\"constantsSummary\" summary=\"Constant Field Values table, listing constant fields, and values\">");
  1092 
  1100 
  1093         // Test for deprecated-list page
  1101         // Test for deprecated-list page
  1094         checkOutput("deprecated-list.html", true,
  1102         checkOutput("deprecated-list.html", true,
  1097                 "<a name=\"navbar.top.firstrow\">\n"
  1105                 "<a name=\"navbar.top.firstrow\">\n"
  1098                 + "<!--   -->\n"
  1106                 + "<!--   -->\n"
  1099                 + "</a>",
  1107                 + "</a>",
  1100                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1108                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1101                 + "</div>\n"
  1109                 + "</div>\n"
       
  1110                 + "<div class=\"navPadding\">&nbsp;</div>\n"
  1102                 + "<div class=\"header\">\n"
  1111                 + "<div class=\"header\">\n"
  1103                 + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
  1112                 + "<h1 title=\"Deprecated API\" class=\"title\">Deprecated API</h1>\n"
  1104                 + "<h2 title=\"Contents\">Contents</h2>",
  1113                 + "<h2 title=\"Contents\">Contents</h2>",
  1105                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
  1114                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Classes table, listing deprecated classes, and an explanation\">",
  1106                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
  1115                 "<table class=\"deprecatedSummary\" summary=\"Deprecated Enums table, listing deprecated enums, and an explanation\">",
  1120                 "<a name=\"navbar.top.firstrow\">\n"
  1129                 "<a name=\"navbar.top.firstrow\">\n"
  1121                 + "<!--   -->\n"
  1130                 + "<!--   -->\n"
  1122                 + "</a>",
  1131                 + "</a>",
  1123                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1132                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1124                 + "</div>\n"
  1133                 + "</div>\n"
       
  1134                 + "<div class=\"navPadding\">&nbsp;</div>\n"
  1125                 + "<div class=\"header\">",
  1135                 + "<div class=\"header\">",
  1126                 "<li class=\"blockList\">\n"
  1136                 "<li class=\"blockList\">\n"
  1127                 + "<h2 title=\"Package\">Package&nbsp;pkg</h2>");
  1137                 + "<h2 title=\"Package\">Package&nbsp;pkg</h2>");
  1128 
  1138 
  1129         // Test for overview-tree page
  1139         // Test for overview-tree page
  1134                 + "<!--   -->\n"
  1144                 + "<!--   -->\n"
  1135                 + "</a>",
  1145                 + "</a>",
  1136                 "<li class=\"circle\">",
  1146                 "<li class=\"circle\">",
  1137                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1147                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1138                 + "</div>\n"
  1148                 + "</div>\n"
       
  1149                 + "<div class=\"navPadding\">&nbsp;</div>\n"
  1139                 + "<div class=\"header\">",
  1150                 + "<div class=\"header\">",
  1140                 "<h1 class=\"title\">Hierarchy For All Packages</h1>\n"
  1151                 "<h1 class=\"title\">Hierarchy For All Packages</h1>\n"
  1141                 + "<span class=\"packageHierarchyLabel\">Package Hierarchies:</span>",
  1152                 + "<span class=\"packageHierarchyLabel\">Package Hierarchies:</span>",
  1142                 "<div class=\"contentContainer\">\n"
  1153                 "<div class=\"contentContainer\">\n"
  1143                 + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
  1154                 + "<h2 title=\"Class Hierarchy\">Class Hierarchy</h2>",
  1153                 "<a name=\"navbar.top.firstrow\">\n"
  1164                 "<a name=\"navbar.top.firstrow\">\n"
  1154                 + "<!--   -->\n"
  1165                 + "<!--   -->\n"
  1155                 + "</a>",
  1166                 + "</a>",
  1156                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1167                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1157                 + "</div>\n"
  1168                 + "</div>\n"
       
  1169                 + "<div class=\"navPadding\">&nbsp;</div>\n"
  1158                 + "<div class=\"contentContainer\">");
  1170                 + "<div class=\"contentContainer\">");
  1159 
  1171 
  1160         // Test for src-html page
  1172         // Test for src-html page
  1161         checkOutput("src-html/pkg/AnotherClass.html", true,
  1173         checkOutput("src-html/pkg/AnotherClass.html", true,
  1162                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
  1174                 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">",
  1170                 "<a name=\"navbar.top.firstrow\">\n"
  1182                 "<a name=\"navbar.top.firstrow\">\n"
  1171                 + "<!--   -->\n"
  1183                 + "<!--   -->\n"
  1172                 + "</a>",
  1184                 + "</a>",
  1173                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1185                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1174                 + "</div>\n"
  1186                 + "</div>\n"
       
  1187                 + "<div class=\"navPadding\">&nbsp;</div>\n"
  1175                 + "<div class=\"header\">",
  1188                 + "<div class=\"header\">",
  1176                 "<ul class=\"blockList\">\n"
  1189                 "<ul class=\"blockList\">\n"
  1177                 + "<li class=\"blockList\">\n"
  1190                 + "<li class=\"blockList\">\n"
  1178                 + "<h2>Overview</h2>",
  1191                 + "<h2>Overview</h2>",
  1179                 "<li class=\"blockList\">\n"
  1192                 "<li class=\"blockList\">\n"
  1377                 "<a name=\"navbar.top.firstrow\">\n"
  1390                 "<a name=\"navbar.top.firstrow\">\n"
  1378                 + "<!--   -->\n"
  1391                 + "<!--   -->\n"
  1379                 + "</a>",
  1392                 + "</a>",
  1380                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1393                 "<!-- ========= END OF TOP NAVBAR ========= -->\n"
  1381                 + "</div>\n"
  1394                 + "</div>\n"
       
  1395                 + "<div class=\"navPadding\">&nbsp;</div>\n"
  1382                 + "<div class=\"header\">",
  1396                 + "<div class=\"header\">",
  1383                 "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
  1397                 "<table class=\"useSummary\" summary=\"Use table, listing packages, and an explanation\">",
  1384                 "<li class=\"blockList\"><a name=\"pkg\">\n"
  1398                 "<li class=\"blockList\"><a name=\"pkg\">\n"
  1385                 + "<!--   -->\n"
  1399                 + "<!--   -->\n"
  1386                 + "</a>\n"
  1400                 + "</a>\n"