--- a/langtools/test/jdk/javadoc/doclet/testModules/TestModules.java Fri Mar 10 09:52:49 2017 -0800
+++ b/langtools/test/jdk/javadoc/doclet/testModules/TestModules.java Mon Mar 13 09:55:31 2017 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363 8168766 8168688 8162674 8160196
+ * @bug 8154119 8154262 8156077 8157987 8154261 8154817 8135291 8155995 8162363 8168766 8168688 8162674 8160196 8175799
* @summary Test modules support in javadoc.
* @author bpatel
* @library ../lib
@@ -44,6 +44,7 @@
@Test
void testHtml4() {
javadoc("-d", "out", "-use",
+ "-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
@@ -65,6 +66,7 @@
@Test
void testHtml5() {
javadoc("-d", "out-html5", "-html5", "-use",
+ "-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
@@ -86,6 +88,7 @@
@Test
void testHtml4NoComment() {
javadoc("-d", "out-nocomment", "-nocomment", "-use",
+ "-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
@@ -103,6 +106,7 @@
@Test
void testHtml5NoComment() {
javadoc("-d", "out-html5-nocomment", "-nocomment", "-html5", "-use",
+ "-overview", testSrc("overview.html"),
"--module-source-path", testSrc,
"--module", "moduleA,moduleB",
"testpkgmdlA", "testpkgmdlB");
@@ -120,6 +124,7 @@
@Test
void testHtml4UnnamedModule() {
javadoc("-d", "out-nomodule", "-use",
+ "-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
@@ -136,6 +141,7 @@
@Test
void testHtml5UnnamedModule() {
javadoc("-d", "out-html5-nomodule", "-html5", "-use",
+ "-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"testpkgnomodule", "testpkgnomodule1");
checkExit(Exit.OK);
@@ -265,6 +271,23 @@
+ "</a>\n"
+ "<div class=\"block\">This is a test description for the moduleB module. Search "
+ "word <a id=\"search_word\">search_word</a> with no description.</div>");
+ checkOutput("overview-summary.html", found,
+ "</script>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\" summary=\"Module Summary table, listing modules, and an explanation\">\n"
+ + "<caption><span>Modules</span><span class=\"tabEnd\"> </span></caption>");
+ checkOutput("overview-summary.html", false,
+ "</table>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\" summary=\"Module Summary table, listing modules, and an explanation\">\n"
+ + "<caption><span>Modules</span><span class=\"tabEnd\"> </span></caption>");
}
void checkNoDescription(boolean found) {
@@ -305,6 +328,27 @@
+ "</a>\n"
+ "<div class=\"block\">This is a test description for the moduleB module. Search "
+ "word <a id=\"search_word\">search_word</a> with no description.</div>");
+ checkOutput("overview-summary.html", found,
+ "</nav>\n"
+ + "</header>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\">\n"
+ + "<caption><span>Modules</span><span class=\"tabEnd\"> </span></caption>");
+ checkOutput("overview-summary.html", false,
+ "</table>\n"
+ + "</div>\n"
+ + "</main>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\">\n"
+ + "<caption><span>Modules</span><span class=\"tabEnd\"> </span></caption>");
}
void checkHtml5NoDescription(boolean found) {
@@ -403,14 +447,29 @@
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Module</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
- + "</tr>");
+ + "</tr>",
+ "</table>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+ + "<caption><span>Packages</span><span class=\"tabEnd\"> </span></caption>");
checkOutput("overview-summary.html", true,
"<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+ "<caption><span>Packages</span><span class=\"tabEnd\"> </span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
- + "</tr>");
+ + "</tr>",
+ "</script>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\" summary=\"Packages table, listing packages, and an explanation\">\n"
+ + "<caption><span>Packages</span><span class=\"tabEnd\"> </span></caption>");
}
void checkHtml5OverviewSummaryModules() {
@@ -437,14 +496,34 @@
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Module</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
- + "</tr>");
+ + "</tr>",
+ "</table>\n"
+ + "</div>\n"
+ + "</main>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\">\n"
+ + "<caption><span>Packages</span><span class=\"tabEnd\"> </span></caption>");
checkOutput("overview-summary.html", true,
"<table class=\"overviewSummary\">\n"
+ "<caption><span>Packages</span><span class=\"tabEnd\"> </span></caption>\n"
+ "<tr>\n"
+ "<th class=\"colFirst\" scope=\"col\">Package</th>\n"
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n"
- + "</tr>");
+ + "</tr>",
+ "</script>\n"
+ + "</nav>\n"
+ + "</header>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<div class=\"block\">The overview summary page header.</div>\n"
+ + "</div>\n"
+ + "<div class=\"contentContainer\">\n"
+ + "<table class=\"overviewSummary\">\n"
+ + "<caption><span>Packages</span><span class=\"tabEnd\"> </span></caption>");
}
void checkModuleSummary() {