author | bpatel |
Tue, 06 Mar 2018 10:45:47 -0800 | |
changeset 49139 | 771616d26ca1 |
parent 48654 | 36f58bd6269f |
child 49879 | 601277b1d582 |
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", |
|
184 |
"-sourcepath", testSrc, |
|
185 |
"-package", |
|
186 |
"linksource"); |
|
187 |
checkExit(Exit.OK); |
|
188 |
||
189 |
checkOutput("linksource/AnnotationTypeField.html", true, |
|
190 |
"<pre>@Documented\npublic @interface <a href=" |
|
191 |
+ "\"../src-html/linksource/AnnotationTypeField.html#line.31\">" |
|
192 |
+ "AnnotationTypeField</a></pre>", |
|
193 |
"<h4>DEFAULT_NAME</h4>\n<pre>static final java.lang.String " |
|
194 |
+ "<a href=\"../src-html/linksource/AnnotationTypeField.html#line.32\">" |
|
195 |
+ "DEFAULT_NAME</a></pre>", |
|
196 |
"<h4>name</h4>\n<pre>java.lang.String <a href=" |
|
197 |
+ "\"../src-html/linksource/AnnotationTypeField.html#line.34\">name</a></pre>"); |
|
198 |
||
199 |
checkOutput("src-html/linksource/AnnotationTypeField.html", true, |
|
200 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
201 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\">" |
36705 | 202 |
+ "@Documented public @interface AnnotationTypeField {</a>"); |
203 |
||
204 |
checkOutput("linksource/Properties.html", true, |
|
205 |
"<pre>public class <a href=\"../src-html/linksource/Properties.html#line.29\">" |
|
206 |
+ "Properties</a>", |
|
207 |
"<pre>public java.lang.Object <a href=" |
|
208 |
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a></pre>", |
|
209 |
"<pre>public java.lang.Object <a href=" |
|
47284
355349babaf4
8186332: Fix method signature in method summary table
bpatel
parents:
47216
diff
changeset
|
210 |
+ "\"../src-html/linksource/Properties.html#line.31\">someProperty</a>()</pre>"); |
36705 | 211 |
|
212 |
checkOutput("src-html/linksource/Properties.html", true, |
|
213 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
214 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> " |
36705 | 215 |
+ "public Object someProperty() {</a>"); |
216 |
||
217 |
checkOutput("linksource/SomeClass.html", true, |
|
218 |
"<pre>public class <a href=\"../src-html/linksource/SomeClass.html#line.29\">" |
|
219 |
+ "SomeClass</a>\nextends java.lang.Object</pre>", |
|
220 |
"<pre>public int <a href=\"../src-html/linksource/SomeClass.html#line.31\">" |
|
221 |
+ "field</a></pre>", |
|
222 |
"<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
|
223 |
+ "SomeClass</a>()</pre>", |
36705 | 224 |
"<pre>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
|
225 |
+ "method</a>()</pre>"); |
36705 | 226 |
|
227 |
checkOutput("src-html/linksource/SomeClass.html", true, |
|
228 |
"<title>Source code</title>", |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
229 |
"<span class=\"sourceLineNo\">029</span><a id=\"line.29\">" |
36705 | 230 |
+ "public class SomeClass {</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
231 |
"<span class=\"sourceLineNo\">031</span><a id=\"line.31\"> " |
36705 | 232 |
+ "public int field;</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
233 |
"<span class=\"sourceLineNo\">033</span><a id=\"line.33\"> " |
36705 | 234 |
+ "public SomeClass() {</a>", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
235 |
"<span class=\"sourceLineNo\">036</span><a id=\"line.36\"> " |
36705 | 236 |
+ "public int method() {</a>"); |
237 |
||
238 |
checkOutput("linksource/SomeEnum.html", true, |
|
48654
36f58bd6269f
8195796: Reduce the size of relative URLs in generated docs
jjg
parents:
47748
diff
changeset
|
239 |
"<pre>public static final <a href=\"SomeEnum.html\" " |
36705 | 240 |
+ "title=\"enum in linksource\">SomeEnum</a> <a href=" |
241 |
+ "\"../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
|
242 |
"<pre>public static final <a href=\"SomeEnum.html\" " |
36705 | 243 |
+ "title=\"enum in linksource\">SomeEnum</a> <a href=" |
244 |
+ "\"../src-html/linksource/SomeEnum.html#line.30\">VALUE2</a></pre>"); |
|
245 |
||
246 |
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
|
247 |
"<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
|
248 |
"<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
|
249 |
} |
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 |
@Test |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
252 |
void testLinkSource_html4() { |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
253 |
javadoc("-d", "out-9-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
254 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
255 |
"-linksource", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
256 |
"-javafx", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
257 |
"-sourcepath", testSrc, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
258 |
"-package", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
259 |
"linksource"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
260 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
261 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
262 |
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
|
263 |
"<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
|
264 |
+ "@Documented public @interface AnnotationTypeField {</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
265 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
266 |
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
|
267 |
"<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
|
268 |
+ "public Object someProperty() {</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
269 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
270 |
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
|
271 |
"<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
|
272 |
+ "public class SomeClass {</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
273 |
"<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
|
274 |
+ "public int field;</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
275 |
"<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
|
276 |
+ "public SomeClass() {</a>", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
277 |
"<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
|
278 |
+ "public int method() {</a>"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
279 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48654
diff
changeset
|
280 |
checkOutput("src-html/linksource/SomeEnum.html", true, |
36705 | 281 |
"<span class=\"sourceLineNo\">029</span><a name=\"line.29\"> VALUE1,</a>", |
282 |
"<span class=\"sourceLineNo\">030</span><a name=\"line.30\"> VALUE2</a>"); |
|
283 |
} |
|
284 |
||
285 |
@Test |
|
286 |
void testNoQualifier() { |
|
287 |
javadoc("-d", "out-10", |
|
288 |
"-noqualifier", "pkg", |
|
289 |
"-sourcepath", testSrc, |
|
290 |
"pkg", "deprecated"); |
|
291 |
checkExit(Exit.OK); |
|
292 |
||
293 |
checkOutput("pkg/Foo.html", true, |
|
294 |
"<li>Foo</li>"); |
|
295 |
checkOutput("deprecated/Foo.html", true, |
|
296 |
"<li>deprecated.Foo</li>"); |
|
297 |
||
298 |
javadoc("-d", "out-10a", |
|
299 |
"-noqualifier", "all", |
|
300 |
"-sourcepath", testSrc, |
|
301 |
"pkg", "deprecated"); |
|
302 |
checkExit(Exit.OK); |
|
303 |
||
304 |
checkOutput("pkg/Foo.html", true, |
|
305 |
"<li>Foo</li>"); |
|
306 |
checkOutput("deprecated/Foo.html", true, |
|
307 |
"<li>Foo</li>"); |
|
308 |
} |
|
19254
0988183c8164
4749567: stddoclet: Add CSS style for setting header/footer to be italic
bpatel
parents:
diff
changeset
|
309 |
} |