--- a/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java Tue Mar 06 17:43:21 2018 +0100
+++ b/test/langtools/jdk/javadoc/doclet/testNavigation/TestNavigation.java Tue Mar 06 10:45:47 2018 -0800
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027
+ * @bug 4131628 4664607 7025314 8023700 7198273 8025633 8026567 8081854 8150188 8151743 8196027 8182765
* @summary Make sure the Next/Prev Class links iterate through all types.
* Make sure the navagation is 2 columns, not 3.
* @author jamieh
@@ -42,7 +42,8 @@
@Test
void test() {
- javadoc("-d", "out", "-overview", testSrc("overview.html"),
+ javadoc("-d", "out",
+ "-overview", testSrc("overview.html"),
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
@@ -62,7 +63,7 @@
checkOutput("pkg/I.html", true,
// Test for 4664607
"<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
- + "<a name=\"navbar.top.firstrow\">\n"
+ + "<a id=\"navbar.top.firstrow\">\n"
+ "<!-- -->\n"
+ "</a>",
"<li><a href=\"../overview-summary.html\">Overview</a></li>");
@@ -76,6 +77,49 @@
+ "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ "//-->\n"
+ "</script>\n"
+ + "</nav>\n"
+ + "</header>\n"
+ + "<!-- ======== START OF CLASS DATA ======== -->");
+
+ checkOutput("pkg/package-summary.html", true,
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "</div>\n"
+ + "<div class=\"navPadding\"> </div>\n"
+ + "<script type=\"text/javascript\"><!--\n"
+ + "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ + "//-->\n"
+ + "</script>\n"
+ + "</nav>\n"
+ + "</header>\n"
+ + "<main role=\"main\">\n"
+ + "<div class=\"header\">");
+ }
+
+ @Test
+ void test_html4() {
+ javadoc("-d", "out-html4",
+ "-html4",
+ "-overview", testSrc("overview.html"),
+ "-sourcepath", testSrc,
+ "pkg");
+ checkExit(Exit.OK);
+
+ checkOutput("pkg/I.html", true,
+ // Test for 4664607
+ "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n"
+ + "<a name=\"navbar.top.firstrow\">\n"
+ + "<!-- -->\n"
+ + "</a>");
+
+ // Remaining tests check for additional padding to offset the fixed navigation bar.
+ checkOutput("pkg/A.html", true,
+ "<!-- ========= END OF TOP NAVBAR ========= -->\n"
+ + "</div>\n"
+ + "<div class=\"navPadding\"> </div>\n"
+ + "<script type=\"text/javascript\"><!--\n"
+ + "$('.navPadding').css('padding-top', $('.fixedNav').css(\"height\"));\n"
+ + "//-->\n"
+ + "</script>\n"
+ "<!-- ======== START OF CLASS DATA ======== -->");
checkOutput("pkg/package-summary.html", true,
@@ -92,7 +136,8 @@
// Test for checking additional padding to offset the fixed navigation bar in HTML5.
@Test
void test1() {
- javadoc("-d", "out-1", "-html5",
+ javadoc("-d", "out-1",
+ "-html5",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
@@ -123,7 +168,8 @@
// Test to make sure that no extra padding for nav bar gets generated if -nonavbar is specified for HTML4.
@Test
void test2() {
- javadoc("-d", "out-2", "-nonavbar",
+ javadoc("-d", "out-2",
+ "-nonavbar",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);
@@ -152,7 +198,9 @@
// Test to make sure that no extra padding for nav bar gets generated if -nonavbar is specified for HTML5.
@Test
void test3() {
- javadoc("-d", "out-3", "-html5", "-nonavbar",
+ javadoc("-d", "out-3",
+ "-html5",
+ "-nonavbar",
"-sourcepath", testSrc,
"pkg");
checkExit(Exit.OK);