author | ksrini |
Mon, 14 Mar 2016 15:04:57 -0700 | |
changeset 36705 | 890c250d8da8 |
parent 35426 | 374342e56a56 |
child 36709 | f9f252088afa |
permissions | -rw-r--r-- |
33920 | 1 |
/* |
36705 | 2 |
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. |
33920 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
22 |
*/ |
|
23 |
||
24 |
/* |
|
25 |
* @test |
|
36705 | 26 |
* @bug 8141492 8071982 |
33920 | 27 |
* @summary Test the search feature of javadoc. |
28 |
* @author bpatel |
|
29 |
* @library ../lib |
|
30 |
* @modules jdk.javadoc |
|
31 |
* @build JavadocTester |
|
32 |
* @run main TestSearch |
|
33 |
*/ |
|
34 |
||
35 |
public class TestSearch extends JavadocTester { |
|
36 |
||
37 |
public static void main(String... args) throws Exception { |
|
38 |
TestSearch tester = new TestSearch(); |
|
39 |
tester.runTests(); |
|
40 |
} |
|
41 |
||
42 |
@Test |
|
43 |
void test1() { |
|
44 |
javadoc("-d", "out-1", "-sourcepath", "-use", testSrc("UnnamedPkgClass.java")); |
|
45 |
checkExit(Exit.OK); |
|
46 |
checkSearchOutput("UnnamedPkgClass.html", true); |
|
47 |
checkJqueryAndImageFiles(true); |
|
48 |
checkFiles(false, |
|
49 |
"package-search-index.zip", |
|
50 |
"tag-search-index.zip"); |
|
51 |
checkFiles(true, |
|
52 |
"member-search-index.zip", |
|
53 |
"type-search-index.zip"); |
|
54 |
} |
|
55 |
||
56 |
@Test |
|
57 |
void test2() { |
|
58 |
javadoc("-d", "out-2", "-Xdoclint:none", "-sourcepath", testSrc, |
|
59 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
|
60 |
checkExit(Exit.OK); |
|
61 |
checkInvalidUsageIndexTag(); |
|
62 |
checkSearchOutput(true); |
|
63 |
checkSingleIndex(true); |
|
64 |
checkJqueryAndImageFiles(true); |
|
65 |
checkFiles(true, |
|
66 |
"member-search-index.zip", |
|
67 |
"package-search-index.zip", |
|
68 |
"tag-search-index.zip", |
|
69 |
"type-search-index.zip"); |
|
70 |
} |
|
71 |
||
72 |
@Test |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
73 |
void test2a() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
74 |
javadoc("-d", "out-2a", "-Xdoclint:all", "-sourcepath", testSrc, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
75 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
76 |
checkExit(Exit.FAILED); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
77 |
checkDocLintErrors(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
78 |
checkSearchOutput(true); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
79 |
checkSingleIndex(true); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
80 |
checkJqueryAndImageFiles(true); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
81 |
checkFiles(true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
82 |
"member-search-index.zip", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
83 |
"package-search-index.zip", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
84 |
"tag-search-index.zip", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
85 |
"type-search-index.zip"); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
86 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
87 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
88 |
@Test |
33920 | 89 |
void test3() { |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
90 |
javadoc("-d", "out-3", "-noindex", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
91 |
"-sourcepath", testSrc, |
33920 | 92 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
93 |
checkExit(Exit.OK); |
|
94 |
checkSearchOutput(false); |
|
95 |
checkJqueryAndImageFiles(false); |
|
96 |
checkFiles(false, |
|
97 |
"member-search-index.zip", |
|
98 |
"package-search-index.zip", |
|
99 |
"tag-search-index.zip", |
|
100 |
"type-search-index.zip", |
|
101 |
"index-all.html"); |
|
102 |
} |
|
103 |
||
104 |
@Test |
|
105 |
void test4() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
106 |
javadoc("-d", "out-4", "-html5", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
107 |
"-sourcepath", testSrc, |
33920 | 108 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
109 |
checkExit(Exit.OK); |
|
110 |
checkSearchOutput(true); |
|
111 |
checkSingleIndex(true); |
|
112 |
checkJqueryAndImageFiles(true); |
|
113 |
checkFiles(true, |
|
114 |
"member-search-index.zip", |
|
115 |
"package-search-index.zip", |
|
116 |
"tag-search-index.zip", |
|
117 |
"type-search-index.zip"); |
|
118 |
} |
|
119 |
||
120 |
@Test |
|
121 |
void test5() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
122 |
javadoc("-d", "out-5", "-noindex", "-html5", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
123 |
"-sourcepath", testSrc, |
33920 | 124 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
125 |
checkExit(Exit.OK); |
|
126 |
checkSearchOutput(false); |
|
127 |
checkJqueryAndImageFiles(false); |
|
128 |
checkFiles(false, |
|
129 |
"member-search-index.zip", |
|
130 |
"package-search-index.zip", |
|
131 |
"tag-search-index.zip", |
|
132 |
"type-search-index.zip", |
|
133 |
"index-all.html"); |
|
134 |
} |
|
135 |
||
136 |
@Test |
|
137 |
void test6() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
138 |
javadoc("-d", "out-6", "-nocomment", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
139 |
"-sourcepath", testSrc, |
33920 | 140 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
141 |
checkExit(Exit.OK); |
|
142 |
checkSearchOutput(true); |
|
143 |
checkIndexNoComment(); |
|
144 |
checkJqueryAndImageFiles(true); |
|
145 |
checkFiles(true, |
|
146 |
"member-search-index.zip", |
|
147 |
"package-search-index.zip", |
|
148 |
"tag-search-index.zip", |
|
149 |
"type-search-index.zip"); |
|
150 |
} |
|
151 |
||
152 |
@Test |
|
153 |
void test7() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
154 |
javadoc("-d", "out-7", "-nodeprecated", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
155 |
"-sourcepath", testSrc, |
33920 | 156 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
157 |
checkExit(Exit.OK); |
|
158 |
checkSearchOutput(true); |
|
159 |
checkIndexNoDeprecated(); |
|
160 |
checkJqueryAndImageFiles(true); |
|
161 |
checkFiles(true, |
|
162 |
"member-search-index.zip", |
|
163 |
"package-search-index.zip", |
|
164 |
"tag-search-index.zip", |
|
165 |
"type-search-index.zip"); |
|
166 |
} |
|
167 |
||
168 |
@Test |
|
169 |
void test8() { |
|
170 |
javadoc("-d", "out-8", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc, |
|
171 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
|
172 |
checkExit(Exit.OK); |
|
173 |
checkInvalidUsageIndexTag(); |
|
174 |
checkSearchOutput(true); |
|
175 |
checkSplitIndex(); |
|
176 |
checkJqueryAndImageFiles(true); |
|
177 |
checkFiles(true, |
|
178 |
"member-search-index.zip", |
|
179 |
"package-search-index.zip", |
|
180 |
"tag-search-index.zip", |
|
181 |
"type-search-index.zip"); |
|
182 |
} |
|
183 |
||
184 |
@Test |
|
185 |
void test9() { |
|
186 |
javadoc("-d", "out-9", "-sourcepath", testSrc, "-javafx", "-package", |
|
187 |
"-use", "pkgfx", "pkg3"); |
|
188 |
checkExit(Exit.OK); |
|
189 |
checkSearchOutput(true); |
|
190 |
checkJavaFXOutput(); |
|
191 |
checkJqueryAndImageFiles(true); |
|
192 |
checkFiles(false, |
|
193 |
"tag-search-index.zip"); |
|
194 |
checkFiles(true, |
|
195 |
"member-search-index.zip", |
|
196 |
"package-search-index.zip", |
|
197 |
"type-search-index.zip"); |
|
198 |
} |
|
199 |
||
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
200 |
void checkDocLintErrors() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
201 |
checkOutput(Output.OUT, true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
202 |
"A sample method. Testing search tag for {@index \"unclosed quote}.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
203 |
"Another test class. Testing empty {@index }.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
204 |
"Constant field. Testing no text in index tag {@index}.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
205 |
"A test field. Testing only white-spaces in index tag text {@index }."); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
206 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
207 |
|
33920 | 208 |
void checkSearchOutput(boolean expectedOutput) { |
209 |
checkSearchOutput("overview-summary.html", expectedOutput); |
|
210 |
} |
|
211 |
||
212 |
void checkSearchOutput(String fileName, boolean expectedOutput) { |
|
213 |
// Test for search related markup |
|
214 |
checkOutput(fileName, expectedOutput, |
|
215 |
"<link rel=\"stylesheet\" type=\"text/css\" href=\"jquery/jquery-ui.css\" title=\"Style\">\n", |
|
216 |
"<script type=\"text/javascript\" src=\"jquery/jszip/dist/jszip.min.js\"></script>\n", |
|
217 |
"<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils.min.js\"></script>\n", |
|
218 |
"<!--[if IE]>\n", |
|
219 |
"<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils-ie.min.js\"></script>\n", |
|
220 |
"<![endif]-->\n", |
|
221 |
"<script type=\"text/javascript\" src=\"jquery/jquery-1.10.2.js\"></script>\n", |
|
222 |
"<script type=\"text/javascript\" src=\"jquery/jquery-ui.js\"></script>", |
|
223 |
"var pathtoroot = \"./\";loadScripts(document, 'script');", |
|
224 |
"<ul class=\"navListSearch\">\n", |
|
225 |
"<li><span>SEARCH: </span>\n", |
|
226 |
"<input type=\"text\" id=\"search\" value=\" \" disabled=\"disabled\">\n", |
|
227 |
"<input type=\"reset\" id=\"reset\" value=\" \" disabled=\"disabled\">\n"); |
|
228 |
checkOutput(fileName, true, |
|
229 |
"<div class=\"fixedNav\">"); |
|
230 |
} |
|
231 |
||
232 |
void checkSingleIndex(boolean expectedOutput) { |
|
233 |
// Test for search tags markup in index file. |
|
234 |
checkOutput("index-all.html", expectedOutput, |
|
235 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
236 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
|
36705 | 237 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">" |
238 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
|
239 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">" |
|
240 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>", |
|
241 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">" |
|
242 |
+ "r</a></span> - Search tag in pkg</dt>", |
|
33920 | 243 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
244 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
|
245 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
|
246 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
|
247 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
|
248 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
|
249 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
|
250 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
|
251 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
252 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
253 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
254 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
255 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
|
256 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
|
257 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
|
258 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
|
259 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
|
260 |
+ "SingleWord</a></span> - Search tag in pkg</dt>", |
|
261 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html" |
|
262 |
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - " |
|
263 |
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>", |
|
264 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html" |
|
265 |
+ "#html-span-see-/span-\">html <span> see </span></a></span> - Search " |
|
266 |
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>", |
|
267 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.html#quoted\">quoted</a>" |
|
268 |
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>"); |
|
269 |
checkOutput("index-all.html", true, |
|
270 |
"<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag" |
|
271 |
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>", |
|
272 |
"<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n" |
|
273 |
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>"); |
|
274 |
} |
|
275 |
||
276 |
void checkSplitIndex() { |
|
277 |
// Test for search tags markup in split index file. |
|
278 |
checkOutput("index-files/index-12.html", true, |
|
279 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#searchphrase\">" |
|
280 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
|
281 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#SearchWordWithDescription\">" |
|
282 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
|
283 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
|
284 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
|
285 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
|
286 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
|
287 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
288 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
289 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
290 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
291 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
|
292 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
|
293 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
|
294 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
|
295 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#SingleWord\">" |
|
296 |
+ "SingleWord</a></span> - Search tag in pkg</dt>"); |
|
297 |
checkOutput("index-files/index-9.html", true, |
|
298 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#phrasewithspaces\">" |
|
36705 | 299 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
300 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg\">" |
|
301 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
|
302 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg2.5\">" |
|
303 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>"); |
|
304 |
checkOutput("index-files/index-11.html", true, |
|
305 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#r\">" |
|
306 |
+ "r</a></span> - Search tag in pkg</dt>"); |
|
33920 | 307 |
checkOutput("index-files/index-8.html", true, |
308 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html" |
|
309 |
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - " |
|
310 |
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>"); |
|
311 |
checkOutput("index-files/index-5.html", true, |
|
312 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html" |
|
313 |
+ "#html-span-see-/span-\">html <span> see </span></a></span> - Search " |
|
314 |
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>"); |
|
315 |
checkOutput("index-files/index-10.html", true, |
|
316 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>" |
|
317 |
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>"); |
|
318 |
} |
|
319 |
||
320 |
void checkIndexNoComment() { |
|
321 |
// Test for search tags markup in index file when javadoc is executed with -nocomment. |
|
322 |
checkOutput("index-all.html", false, |
|
323 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
324 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
|
36705 | 325 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">" |
326 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
|
327 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">" |
|
328 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>", |
|
329 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">" |
|
330 |
+ "r</a></span> - Search tag in pkg</dt>", |
|
33920 | 331 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
332 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
|
333 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
|
334 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
|
335 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
|
336 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
|
337 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
|
338 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
|
339 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
|
340 |
+ "SingleWord</a></span> - Search tag in pkg</dt>", |
|
341 |
"<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag" |
|
342 |
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>", |
|
343 |
"<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n" |
|
344 |
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>"); |
|
345 |
checkOutput("index-all.html", true, |
|
346 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
347 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
348 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
|
349 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>"); |
|
350 |
} |
|
351 |
||
352 |
void checkIndexNoDeprecated() { |
|
353 |
// Test for search tags markup in index file when javadoc is executed using -nodeprecated. |
|
354 |
checkOutput("index-all.html", true, |
|
355 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
356 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
|
357 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
|
358 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
|
359 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
|
360 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
|
361 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
|
362 |
+ "SingleWord</a></span> - Search tag in pkg</dt>"); |
|
363 |
checkOutput("index-all.html", false, |
|
364 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
|
365 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
|
366 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
|
367 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
|
368 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
369 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
370 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
|
371 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
|
372 |
"<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag" |
|
373 |
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>", |
|
374 |
"<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n" |
|
375 |
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>"); |
|
376 |
} |
|
377 |
||
378 |
void checkJavaFXOutput() { |
|
379 |
checkOutput("index-all.html", false, "test treat as private"); |
|
380 |
} |
|
381 |
||
382 |
void checkInvalidUsageIndexTag() { |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
383 |
checkOutput(Output.OUT, true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
384 |
"AnotherClass.java:29: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
385 |
"AnotherClass.java:41: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
386 |
"AnotherClass.java:36: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
387 |
"AnotherClass.java:70: warning - invalid usage of tag {@index"); |
33920 | 388 |
} |
389 |
||
390 |
void checkJqueryAndImageFiles(boolean expectedOutput) { |
|
391 |
checkFiles(expectedOutput, |
|
392 |
"search.js", |
|
393 |
"jquery/jquery-1.10.2.js", |
|
394 |
"jquery/jquery-ui.js", |
|
395 |
"jquery/jquery-ui.css", |
|
396 |
"jquery/jquery-ui.min.js", |
|
397 |
"jquery/jquery-ui.min.css", |
|
398 |
"jquery/jquery-ui.structure.min.css", |
|
399 |
"jquery/jquery-ui.structure.css", |
|
400 |
"jquery/external/jquery/jquery.js", |
|
401 |
"jquery/jszip/dist/jszip.js", |
|
402 |
"jquery/jszip/dist/jszip.min.js", |
|
403 |
"jquery/jszip-utils/dist/jszip-utils.js", |
|
404 |
"jquery/jszip-utils/dist/jszip-utils.min.js", |
|
405 |
"jquery/jszip-utils/dist/jszip-utils-ie.js", |
|
406 |
"jquery/jszip-utils/dist/jszip-utils-ie.min.js", |
|
407 |
"jquery/images/ui-bg_flat_0_aaaaaa_40x100.png", |
|
408 |
"jquery/images/ui-icons_454545_256x240.png", |
|
409 |
"jquery/images/ui-bg_glass_95_fef1ec_1x400.png", |
|
410 |
"jquery/images/ui-bg_glass_75_dadada_1x400.png", |
|
411 |
"jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png", |
|
412 |
"jquery/images/ui-icons_888888_256x240.png", |
|
413 |
"jquery/images/ui-icons_2e83ff_256x240.png", |
|
414 |
"jquery/images/ui-bg_glass_65_ffffff_1x400.png", |
|
415 |
"jquery/images/ui-icons_cd0a0a_256x240.png", |
|
416 |
"jquery/images/ui-bg_glass_55_fbf9ee_1x400.png", |
|
417 |
"jquery/images/ui-icons_222222_256x240.png", |
|
418 |
"jquery/images/ui-bg_glass_75_e6e6e6_1x400.png", |
|
419 |
"jquery/images/ui-bg_flat_75_ffffff_40x100.png", |
|
420 |
"resources/x.png", |
|
421 |
"resources/glass.png"); |
|
422 |
} |
|
423 |
} |