author | pmuthuswamy |
Tue, 17 Jul 2018 16:49:55 +0530 | |
changeset 51127 | c2e676c2cf7b |
parent 49879 | 601277b1d582 |
child 53097 | 2e82ca64b25d |
permissions | -rw-r--r-- |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
1 |
/* |
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47748
diff
changeset
|
2 |
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
4 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
8 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
13 |
* accompanied this code). |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
14 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
18 |
* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
21 |
* questions. |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
22 |
*/ |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
23 |
|
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
24 |
/* |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
25 |
* @test |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
26 |
* @bug 4749567 8071982 8175200 8186332 8185371 8182765 |
47748
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
27 |
* @summary Test the output for -header, -footer, -nooverview, -nodeprecatedlist, -nonavbar, -notree, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
28 |
* -stylesheetfile, --main-stylesheet, --add-stylesheet options. |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
29 |
* @author Bhavesh Patel |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
30 |
* @library ../lib |
36526 | 31 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
32 |
* @build JavadocTester |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
33 |
* @run main TestOptions |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
34 |
*/ |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
35 |
|
36705 | 36 |
import java.io.File; |
37 |
||
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
38 |
public class TestOptions extends JavadocTester { |
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
39 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
40 |
public static void main(String... args) throws Exception { |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
41 |
TestOptions tester = new TestOptions(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
42 |
tester.runTests(); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
43 |
} |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
44 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
45 |
@Test |
36705 | 46 |
void testHeaderFooter() { |
47 |
javadoc("-d", "out-1", |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
48 |
"-header", "Test header", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
49 |
"-footer", "Test footer", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
50 |
"-sourcepath", testSrc, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
51 |
"pkg"); |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
52 |
checkExit(Exit.OK); |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
53 |
|
24399
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
54 |
checkOutput("pkg/package-summary.html", true, |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
55 |
"<div class=\"aboutLanguage\">Test header</div>", |
af1a0220d0fa
8038730: Clean up the way JavadocTester is invoked, and checks for errors.
jjg
parents:
24072
diff
changeset
|
56 |
"<div class=\"aboutLanguage\">Test footer</div>"); |
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
57 |
} |
36705 | 58 |
|
59 |
@Test |
|
60 |
void testNoOverview() { |
|
61 |
javadoc("-d", "out-4", |
|
62 |
"-nooverview", |
|
63 |
"-sourcepath", testSrc, |
|
64 |
"pkg", "deprecated"); |
|
65 |
||
66 |
checkExit(Exit.OK); |
|
67 |
||
68 |
checkFiles(false, "overview-summary.html"); |
|
69 |
} |
|
70 |
||
71 |
@Test |
|
72 |
void testNoDeprecatedList() { |
|
73 |
javadoc("-d", "out-5", |
|
74 |
"-nodeprecatedlist", |
|
75 |
"-sourcepath", testSrc, |
|
76 |
"deprecated"); |
|
77 |
checkExit(Exit.OK); |
|
78 |
||
79 |
checkFiles(false, "deprecated-list.html"); |
|
80 |
} |
|
81 |
||
82 |
@Test |
|
83 |
void testNoNavbar() { |
|
84 |
javadoc("-d", "out-6", |
|
85 |
"-nonavbar", |
|
86 |
"-bottom", "Bottom text", |
|
87 |
"-sourcepath", testSrc, |
|
88 |
"pkg"); |
|
89 |
checkExit(Exit.OK); |
|
90 |
||
91 |
checkOutput("pkg/Foo.html", false, "navbar"); |
|
92 |
checkOutput("pkg/Foo.html", true, "Bottom text"); |
|
93 |
} |
|
94 |
||
95 |
@Test |
|
96 |
void testNoTree() { |
|
97 |
javadoc("-d", "out-7", |
|
98 |
"-notree", |
|
99 |
"-sourcepath", testSrc, |
|
100 |
"pkg"); |
|
101 |
checkExit(Exit.OK); |
|
102 |
||
103 |
checkFiles(false, "overview-tree.html"); |
|
104 |
checkFiles(false, "pkg/package-tree.html"); |
|
105 |
checkOutput("pkg/Foo.html", false, "<li><a href=\"package-tree.html\">Tree</a></li>"); |
|
106 |
} |
|
107 |
||
108 |
@Test |
|
109 |
void testStylesheetFile() { |
|
110 |
javadoc("-d", "out-8", |
|
111 |
"-stylesheetfile", new File(testSrc, "custom-stylesheet.css").getAbsolutePath(), |
|
112 |
"-sourcepath", testSrc, |
|
113 |
"pkg"); |
|
114 |
checkExit(Exit.OK); |
|
115 |
||
116 |
checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet"); |
|
117 |
checkOutput("pkg/Foo.html", true, "<link rel=\"stylesheet\" type=\"text/css\" " |
|
118 |
+ "href=\"../custom-stylesheet.css\" title=\"Style\">"); |
|
119 |
} |
|
120 |
||
121 |
@Test |
|
47748
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
122 |
void testStylesheetFileAltOption() { |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
123 |
javadoc("-d", "out-stylesheet-file", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
124 |
"--main-stylesheet", new File(testSrc, "custom-stylesheet.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
125 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
126 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
127 |
checkExit(Exit.OK); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
128 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
129 |
checkOutput("custom-stylesheet.css", true, "Custom javadoc style sheet"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
130 |
checkOutput("pkg/Foo.html", true, "<link rel=\"stylesheet\" type=\"text/css\" " |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
131 |
+ "href=\"../custom-stylesheet.css\" title=\"Style\">"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
132 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
133 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
134 |
@Test |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
135 |
void testAdditionalStylesheetFile() { |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
136 |
javadoc("-d", "out-additional-css", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
137 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-1.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
138 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-2.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
139 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-3.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
140 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
141 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
142 |
checkExit(Exit.OK); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
143 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
144 |
checkOutput("additional-stylesheet-1.css", true, "Additional javadoc style sheet 1"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
145 |
checkOutput("additional-stylesheet-2.css", true, "Additional javadoc style sheet 2"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
146 |
checkOutput("additional-stylesheet-3.css", true, "Additional javadoc style sheet 3"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
147 |
checkOutput("pkg/Foo.html", true, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
148 |
"<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-1.css\" title=\"Style\">\n" |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
149 |
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-2.css\" title=\"Style\">\n" |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
150 |
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"../additional-stylesheet-3.css\" title=\"Style\">"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
151 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
152 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
153 |
@Test |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
154 |
void testInvalidStylesheetFile() { |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
155 |
javadoc("-d", "out-invalid-css", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
156 |
"--main-stylesheet", new File(testSrc, "custom-stylesheet-1.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
157 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
158 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
159 |
checkExit(Exit.ERROR); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
160 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
161 |
checkOutput(Output.OUT, true, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
162 |
"javadoc: error - File not found:", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
163 |
"custom-stylesheet-1.css"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
164 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
165 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
166 |
@Test |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
167 |
void testInvalidAdditionalStylesheetFiles() { |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
168 |
javadoc("-d", "out-invalid-additional-css", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
169 |
"--add-stylesheet", new File(testSrc, "additional-stylesheet-4.css").getAbsolutePath(), |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
170 |
"-sourcepath", testSrc, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
171 |
"pkg"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
172 |
checkExit(Exit.ERROR); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
173 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
174 |
checkOutput(Output.OUT, true, |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
175 |
"javadoc: error - File not found:", |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
176 |
"additional-stylesheet-4.css"); |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
177 |
} |
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
178 |
|
dfc709c80775
8185371: Support for multiple stylesheets in javadoc
bpatel
parents:
47284
diff
changeset
|
179 |
@Test |
36705 | 180 |
void testLinkSource() { |
181 |
javadoc("-d", "out-9", |
|
182 |
"-linksource", |
|
183 |
"-javafx", |
|
49879
601277b1d582
8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents:
49139
diff
changeset
|
184 |
"--disable-javafx-strict-checks", |
36705 | 185 |
"-sourcepath", testSrc, |
186 |
"-package", |
|
187 |
"linksource"); |
|
188 |
checkExit(Exit.OK); |
|
189 |
||
190 |
checkOutput("linksource/AnnotationTypeField.html", true, |
|
191 |
"<pre>@Documented\npublic @interface <a href=" |
|
192 |
+ "\"../src-html/linksource/AnnotationTypeField.html#line.31\">" |
|
193 |
+ "AnnotationTypeField</a></pre>", |
|
194 |
"<h4>DEFAULT_NAME</h4>\n<pre>static final java.lang.String " |
|
195 |
+ "<a href=\"../src-html/linksource/AnnotationTypeField.html#line.32\">" |
|
196 |
+ "DEFAULT_NAME</a></pre>", |
|
197 |
"<h4>name</h4>\n<pre>java.lang.String <a href=" |
|
198 |
+ "\"../src-html/linksource/AnnotationTypeField.html#line.34\">name</a></pre>"); |
|
199 |
||
200 |
checkOutput("src-html/linksource/AnnotationTypeField.html", true, |
|
201 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
202 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\">" |
36705 | 203 |
+ "@Documented public @interface AnnotationTypeField {</a>"); |
204 |
||
205 |
checkOutput("linksource/Properties.html", true, |
|
206 |
"<pre>public class <a href=\"../src-html/linksource/Properties.html#line.29\">" |
|
207 |
+ "Properties</a>", |
|
208 |
"<pre>public java.lang.Object <a href=" |
|
209 |
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a></pre>", |
|
51127
c2e676c2cf7b
8207190: JDK 11 javadoc generates bad code example
pmuthuswamy
parents:
49879
diff
changeset
|
210 |
"<pre class=\"methodSignature\">public java.lang.Object <a href=" |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
211 |
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a>()</pre>"); |
36705 | 212 |
|
213 |
checkOutput("src-html/linksource/Properties.html", true, |
|
214 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
215 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> " |
36705 | 216 |
+ "public Object someProperty() {</a>"); |
217 |
||
218 |
checkOutput("linksource/SomeClass.html", true, |
|
219 |
"<pre>public class <a href=\"../src-html/linksource/SomeClass.html#line.29\">" |
|
220 |
+ "SomeClass</a>\nextends java.lang.Object</pre>", |
|
221 |
"<pre>public int <a href=\"../src-html/linksource/SomeClass.html#line.31\">" |
|
222 |
+ "field</a></pre>", |
|
223 |
"<pre>public <a href=\"../src-html/linksource/SomeClass.html#line.33\">" |
|
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
224 |
+ "SomeClass</a>()</pre>", |
51127
c2e676c2cf7b
8207190: JDK 11 javadoc generates bad code example
pmuthuswamy
parents:
49879
diff
changeset
|
225 |
"<pre class=\"methodSignature\">public int <a href=\"../src-html/linksource/SomeClass.html#line.36\">" |
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
226 |
+ "method</a>()</pre>"); |
36705 | 227 |
|
228 |
checkOutput("src-html/linksource/SomeClass.html", true, |
|
229 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
230 |
"<span class=\"sourceLineNo\">029</span><a id=\"line.29\">" |
36705 | 231 |
+ "public class SomeClass {</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
232 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> " |
36705 | 233 |
+ "public int field;</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
234 |
"<span class=\"sourceLineNo\">033</span><a id=\"line.33\"> " |
36705 | 235 |
+ "public SomeClass() {</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
236 |
"<span class=\"sourceLineNo\">036</span><a id=\"line.36\"> " |
36705 | 237 |
+ "public int method() {</a>"); |
238 |
||
239 |
checkOutput("linksource/SomeEnum.html", true, |
|
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47748
diff
changeset
|
240 |
"<pre>public static final <a href=\"SomeEnum.html\" " |
36705 | 241 |
+ "title=\"enum in linksource\">SomeEnum</a> <a href=" |
242 |
+ "\"../src-html/linksource/SomeEnum.html#line.29\">VALUE1</a></pre>", |
|
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47748
diff
changeset
|
243 |
"<pre>public static final <a href=\"SomeEnum.html\" " |
36705 | 244 |
+ "title=\"enum in linksource\">SomeEnum</a> <a href=" |
245 |
+ "\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></pre>"); |
|
246 |
||
247 |
checkOutput("src-html/linksource/SomeEnum.html", true, |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
248 |
"<span class=\"sourceLineNo\">029</span><a id=\"line.29\"> VALUE1,</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
249 |
"<span class=\"sourceLineNo\">030</span><a id=\"line.30\"> VALUE2</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
250 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
251 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
252 |
@Test |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
253 |
void testLinkSource_html4() { |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
254 |
javadoc("-d", "out-9-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
255 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
256 |
"-linksource", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
257 |
"-javafx", |
49879
601277b1d582
8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents:
49139
diff
changeset
|
258 |
"--disable-javafx-strict-checks", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
259 |
"-sourcepath", testSrc, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
260 |
"-package", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
261 |
"linksource"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
262 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
263 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
264 |
checkOutput("src-html/linksource/AnnotationTypeField.html", true, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
265 |
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\">" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
266 |
+ "@Documented public @interface AnnotationTypeField {</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
267 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
268 |
checkOutput("src-html/linksource/Properties.html", true, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
269 |
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> " |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
270 |
+ "public Object someProperty() {</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
271 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
272 |
checkOutput("src-html/linksource/SomeClass.html", true, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
273 |
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\">" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
274 |
+ "public class SomeClass {</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
275 |
"<span class=\"sourceLineNo\">031</span><a name=\"line.31\"> " |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
276 |
+ "public int field;</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
277 |
"<span class=\"sourceLineNo\">033</span><a name=\"line.33\"> " |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
278 |
+ "public SomeClass() {</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
279 |
"<span class=\"sourceLineNo\">036</span><a name=\"line.36\"> " |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
280 |
+ "public int method() {</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
281 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
282 |
checkOutput("src-html/linksource/SomeEnum.html", true, |
36705 | 283 |
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\"> VALUE1,</a>", |
284 |
"<span class=\"sourceLineNo\">030</span><a name=\"line.30\"> VALUE2</a>"); |
|
285 |
} |
|
286 |
||
287 |
@Test |
|
288 |
void testNoQualifier() { |
|
289 |
javadoc("-d", "out-10", |
|
290 |
"-noqualifier", "pkg", |
|
291 |
"-sourcepath", testSrc, |
|
292 |
"pkg", "deprecated"); |
|
293 |
checkExit(Exit.OK); |
|
294 |
||
295 |
checkOutput("pkg/Foo.html", true, |
|
296 |
"<li>Foo</li>"); |
|
297 |
checkOutput("deprecated/Foo.html", true, |
|
298 |
"<li>deprecated.Foo</li>"); |
|
299 |
||
300 |
javadoc("-d", "out-10a", |
|
301 |
"-noqualifier", "all", |
|
302 |
"-sourcepath", testSrc, |
|
303 |
"pkg", "deprecated"); |
|
304 |
checkExit(Exit.OK); |
|
305 |
||
306 |
checkOutput("pkg/Foo.html", true, |
|
307 |
"<li>Foo</li>"); |
|
308 |
checkOutput("deprecated/Foo.html", true, |
|
309 |
"<li>Foo</li>"); |
|
310 |
} |
|
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
311 |
} |