author | bpatel |
Mon, 26 Feb 2018 17:18:15 -0800 | |
changeset 48991 | 978c3036fbfc |
parent 47328 | d18df41954ba |
child 49139 | 771616d26ca1 |
permissions | -rw-r--r-- |
33920 | 1 |
/* |
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
2 |
* Copyright (c) 2015, 2018, 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 |
|
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
26 |
* @bug 8141492 8071982 8141636 8147890 8166175 8168965 8176794 8175218 8147881 |
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
27 |
* 8181622 8182263 8074407 8187521 8198522 |
33920 | 28 |
* @summary Test the search feature of javadoc. |
29 |
* @author bpatel |
|
30 |
* @library ../lib |
|
36526 | 31 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
33920 | 32 |
* @build JavadocTester |
33 |
* @run main TestSearch |
|
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); |
|
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
46 |
checkSearchOutput("UnnamedPkgClass.html", true, true); |
33920 | 47 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
48 |
checkSearchJS(); |
33920 | 49 |
checkFiles(false, |
50 |
"package-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
51 |
"tag-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
52 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
53 |
"tag-search-index.js"); |
33920 | 54 |
checkFiles(true, |
55 |
"member-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
56 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
57 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
58 |
"type-search-index.js"); |
33920 | 59 |
} |
60 |
||
61 |
@Test |
|
62 |
void test2() { |
|
63 |
javadoc("-d", "out-2", "-Xdoclint:none", "-sourcepath", testSrc, |
|
64 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
|
65 |
checkExit(Exit.OK); |
|
66 |
checkInvalidUsageIndexTag(); |
|
67 |
checkSearchOutput(true); |
|
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
68 |
checkSingleIndex(true, false); |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
69 |
checkSingleIndexSearchTagDuplication(); |
33920 | 70 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
71 |
checkSearchJS(); |
33920 | 72 |
checkFiles(true, |
73 |
"member-search-index.zip", |
|
74 |
"package-search-index.zip", |
|
75 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
76 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
77 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
78 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
79 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
80 |
"type-search-index.js"); |
33920 | 81 |
} |
82 |
||
83 |
@Test |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
84 |
void test2a() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
85 |
javadoc("-d", "out-2a", "-Xdoclint:all", "-sourcepath", testSrc, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
86 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
41451 | 87 |
checkExit(Exit.ERROR); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
88 |
checkDocLintErrors(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
89 |
checkSearchOutput(true); |
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
90 |
checkSingleIndex(true, false); |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
91 |
checkSingleIndexSearchTagDuplication(); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
92 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
93 |
checkSearchJS(); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
94 |
checkFiles(true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
95 |
"member-search-index.zip", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
96 |
"package-search-index.zip", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
97 |
"tag-search-index.zip", |
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
98 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
99 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
100 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
101 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
102 |
"type-search-index.js"); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
103 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
104 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
105 |
@Test |
33920 | 106 |
void test3() { |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
107 |
javadoc("-d", "out-3", "-noindex", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
108 |
"-sourcepath", testSrc, |
33920 | 109 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
110 |
checkExit(Exit.OK); |
|
111 |
checkSearchOutput(false); |
|
112 |
checkJqueryAndImageFiles(false); |
|
113 |
checkFiles(false, |
|
114 |
"member-search-index.zip", |
|
115 |
"package-search-index.zip", |
|
116 |
"tag-search-index.zip", |
|
117 |
"type-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
118 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
119 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
120 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
121 |
"type-search-index.js", |
33920 | 122 |
"index-all.html"); |
123 |
} |
|
124 |
||
125 |
@Test |
|
126 |
void test4() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
127 |
javadoc("-d", "out-4", "-html5", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
128 |
"-sourcepath", testSrc, |
33920 | 129 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
130 |
checkExit(Exit.OK); |
|
131 |
checkSearchOutput(true); |
|
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
132 |
checkSingleIndex(true, true); |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
133 |
checkSingleIndexSearchTagDuplication(); |
33920 | 134 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
135 |
checkSearchJS(); |
33920 | 136 |
checkFiles(true, |
137 |
"member-search-index.zip", |
|
138 |
"package-search-index.zip", |
|
139 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
140 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
141 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
142 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
143 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
144 |
"type-search-index.js"); |
33920 | 145 |
} |
146 |
||
147 |
@Test |
|
148 |
void test5() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
149 |
javadoc("-d", "out-5", "-noindex", "-html5", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
150 |
"-sourcepath", testSrc, |
33920 | 151 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
152 |
checkExit(Exit.OK); |
|
153 |
checkSearchOutput(false); |
|
154 |
checkJqueryAndImageFiles(false); |
|
155 |
checkFiles(false, |
|
156 |
"member-search-index.zip", |
|
157 |
"package-search-index.zip", |
|
158 |
"tag-search-index.zip", |
|
159 |
"type-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
160 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
161 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
162 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
163 |
"type-search-index.js", |
33920 | 164 |
"index-all.html"); |
165 |
} |
|
166 |
||
167 |
@Test |
|
168 |
void test6() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
169 |
javadoc("-d", "out-6", "-nocomment", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
170 |
"-sourcepath", testSrc, |
33920 | 171 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
172 |
checkExit(Exit.OK); |
|
173 |
checkSearchOutput(true); |
|
174 |
checkIndexNoComment(); |
|
175 |
checkJqueryAndImageFiles(true); |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
176 |
checkSearchJS(); |
33920 | 177 |
checkFiles(true, |
178 |
"member-search-index.zip", |
|
179 |
"package-search-index.zip", |
|
180 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
181 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
182 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
183 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
184 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
185 |
"type-search-index.js"); |
33920 | 186 |
} |
187 |
||
188 |
@Test |
|
189 |
void test7() { |
|
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
190 |
javadoc("-d", "out-7", "-nodeprecated", "-Xdoclint:none", |
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
191 |
"-sourcepath", testSrc, |
33920 | 192 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
193 |
checkExit(Exit.OK); |
|
194 |
checkSearchOutput(true); |
|
195 |
checkIndexNoDeprecated(); |
|
196 |
checkJqueryAndImageFiles(true); |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
197 |
checkSearchJS(); |
33920 | 198 |
checkFiles(true, |
199 |
"member-search-index.zip", |
|
200 |
"package-search-index.zip", |
|
201 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
202 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
203 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
204 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
205 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
206 |
"type-search-index.js"); |
33920 | 207 |
} |
208 |
||
209 |
@Test |
|
210 |
void test8() { |
|
211 |
javadoc("-d", "out-8", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc, |
|
212 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
|
213 |
checkExit(Exit.OK); |
|
214 |
checkInvalidUsageIndexTag(); |
|
215 |
checkSearchOutput(true); |
|
216 |
checkSplitIndex(); |
|
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
217 |
checkSplitIndexSearchTagDuplication(); |
33920 | 218 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
219 |
checkSearchJS(); |
33920 | 220 |
checkFiles(true, |
221 |
"member-search-index.zip", |
|
222 |
"package-search-index.zip", |
|
223 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
224 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
225 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
226 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
227 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
228 |
"type-search-index.js"); |
33920 | 229 |
} |
230 |
||
231 |
@Test |
|
232 |
void test9() { |
|
233 |
javadoc("-d", "out-9", "-sourcepath", testSrc, "-javafx", "-package", |
|
234 |
"-use", "pkgfx", "pkg3"); |
|
235 |
checkExit(Exit.OK); |
|
236 |
checkSearchOutput(true); |
|
237 |
checkJavaFXOutput(); |
|
238 |
checkJqueryAndImageFiles(true); |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
239 |
checkSearchJS(); |
33920 | 240 |
checkFiles(false, |
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
241 |
"tag-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
242 |
"tag-search-index.js"); |
33920 | 243 |
checkFiles(true, |
244 |
"member-search-index.zip", |
|
245 |
"package-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
246 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
247 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
248 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
249 |
"type-search-index.js"); |
33920 | 250 |
} |
251 |
||
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
252 |
@Test |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
253 |
void testNoModuleDirectories() { |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
254 |
javadoc("-d", "out-noMdlDir", "--no-module-directories", "-Xdoclint:none", |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
255 |
"-sourcepath", testSrc, |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
256 |
"-use", "pkg", "pkg1", "pkg2", "pkg3"); |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
257 |
checkExit(Exit.OK); |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
258 |
checkSearchOutput(true, false); |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
259 |
checkSearchJS(); |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
260 |
} |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
261 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
262 |
void checkDocLintErrors() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
263 |
checkOutput(Output.OUT, true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
264 |
"A sample method. Testing search tag for {@index \"unclosed quote}.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
265 |
"Another test class. Testing empty {@index }.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
266 |
"Constant field. Testing no text in index tag {@index}.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
267 |
"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
|
268 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
269 |
|
33920 | 270 |
void checkSearchOutput(boolean expectedOutput) { |
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
271 |
checkSearchOutput("overview-summary.html", expectedOutput, true); |
33920 | 272 |
} |
273 |
||
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
274 |
void checkSearchOutput(boolean expectedOutput, boolean moduleDirectoriesVar) { |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
275 |
checkSearchOutput("overview-summary.html", expectedOutput, moduleDirectoriesVar); |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
276 |
} |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
277 |
|
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
278 |
void checkSearchOutput(String fileName, boolean expectedOutput, boolean moduleDirectoriesVar) { |
33920 | 279 |
// Test for search related markup |
280 |
checkOutput(fileName, expectedOutput, |
|
281 |
"<link rel=\"stylesheet\" type=\"text/css\" href=\"jquery/jquery-ui.css\" title=\"Style\">\n", |
|
282 |
"<script type=\"text/javascript\" src=\"jquery/jszip/dist/jszip.min.js\"></script>\n", |
|
283 |
"<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils.min.js\"></script>\n", |
|
284 |
"<!--[if IE]>\n", |
|
285 |
"<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils-ie.min.js\"></script>\n", |
|
286 |
"<![endif]-->\n", |
|
287 |
"<script type=\"text/javascript\" src=\"jquery/jquery-1.10.2.js\"></script>\n", |
|
288 |
"<script type=\"text/javascript\" src=\"jquery/jquery-ui.js\"></script>", |
|
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
289 |
"var pathtoroot = \"./\";\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
290 |
+ "var useModuleDirectories = " + moduleDirectoriesVar + ";\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
291 |
+ "loadScripts(document, 'script');", |
33920 | 292 |
"<ul class=\"navListSearch\">\n", |
47047
91082c3c1d05
8182263: Search box and reset button needs to be a11y fixed.
bpatel
parents:
45913
diff
changeset
|
293 |
"<li><label for=\"search\">SEARCH:</label>\n" |
91082c3c1d05
8182263: Search box and reset button needs to be a11y fixed.
bpatel
parents:
45913
diff
changeset
|
294 |
+ "<input type=\"text\" id=\"search\" value=\"search\" disabled=\"disabled\">\n" |
91082c3c1d05
8182263: Search box and reset button needs to be a11y fixed.
bpatel
parents:
45913
diff
changeset
|
295 |
+ "<input type=\"reset\" id=\"reset\" value=\"reset\" disabled=\"disabled\">\n"); |
33920 | 296 |
checkOutput(fileName, true, |
297 |
"<div class=\"fixedNav\">"); |
|
298 |
} |
|
299 |
||
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
300 |
void checkSingleIndex(boolean expectedOutput, boolean html5) { |
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
301 |
String html_span_see_span = html5 ? "html%3Cspan%3Esee%3C/span%3E" : "html-span-see-/span-"; |
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
302 |
|
33920 | 303 |
// Test for search tags markup in index file. |
304 |
checkOutput("index-all.html", expectedOutput, |
|
305 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
42263 | 306 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
36705 | 307 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">" |
42263 | 308 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
36705 | 309 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">" |
42263 | 310 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>", |
36705 | 311 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">" |
42263 | 312 |
+ "r</a></span> - Search tag in pkg</dt>", |
33920 | 313 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
42263 | 314 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 315 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 316 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 317 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
42263 | 318 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 319 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 320 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
321 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
322 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
33920 | 323 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 324 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 325 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 326 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 327 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 328 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 329 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
42263 | 330 |
+ "SingleWord</a></span> - Search tag in pkg</dt>", |
33920 | 331 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html" |
42263 | 332 |
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - " |
333 |
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>", |
|
33920 | 334 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html" |
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
335 |
+ "#" + html_span_see_span + "\">html <span> see </span></a></span> - Search " |
42263 | 336 |
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>", |
33920 | 337 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.html#quoted\">quoted</a>" |
42263 | 338 |
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>", |
339 |
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#ONE\">ONE</a></span> - " |
|
340 |
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>", |
|
341 |
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#THREE\">THREE</a></span> - " |
|
342 |
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>", |
|
343 |
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#TWO\">TWO</a></span> - " |
|
344 |
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>"); |
|
33920 | 345 |
checkOutput("index-all.html", true, |
47300
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
346 |
"<div class=\"deprecationComment\">class_test1 passes. Search tag" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
347 |
+ " <a id=\"SearchTagDeprecatedClass\" class=\"searchTagResult\">SearchTagDeprecatedClass</a></div>", |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
348 |
"<div class=\"deprecationComment\">error_test3 passes. Search tag for\n" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
349 |
+ " method <a id=\"SearchTagDeprecatedMethod\" class=\"searchTagResult\">SearchTagDeprecatedMethod</a></div>"); |
33920 | 350 |
} |
351 |
||
352 |
void checkSplitIndex() { |
|
353 |
// Test for search tags markup in split index file. |
|
42263 | 354 |
checkOutput("index-files/index-13.html", true, |
33920 | 355 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#searchphrase\">" |
42263 | 356 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 357 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 358 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 359 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
42263 | 360 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 361 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 362 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
33920 | 363 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 364 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 365 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 366 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 367 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 368 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 369 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 370 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 371 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#SingleWord\">" |
42263 | 372 |
+ "SingleWord</a></span> - Search tag in pkg</dt>"); |
373 |
checkOutput("index-files/index-10.html", true, |
|
33920 | 374 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#phrasewithspaces\">" |
42263 | 375 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
36705 | 376 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg\">" |
42263 | 377 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
36705 | 378 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg2.5\">" |
42263 | 379 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>"); |
380 |
checkOutput("index-files/index-12.html", true, |
|
36705 | 381 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#r\">" |
42263 | 382 |
+ "r</a></span> - Search tag in pkg</dt>"); |
33920 | 383 |
checkOutput("index-files/index-8.html", true, |
384 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html" |
|
42263 | 385 |
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - " |
386 |
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>"); |
|
33920 | 387 |
checkOutput("index-files/index-5.html", true, |
388 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html" |
|
42263 | 389 |
+ "#html-span-see-/span-\">html <span> see </span></a></span> - Search " |
390 |
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>"); |
|
391 |
checkOutput("index-files/index-11.html", true, |
|
33920 | 392 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>" |
42263 | 393 |
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>"); |
394 |
checkOutput("index-files/index-9.html", true, |
|
395 |
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#ONE\">ONE</a>" |
|
396 |
+ "</span> - pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>"); |
|
397 |
checkOutput("index-files/index-14.html", true, |
|
398 |
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#THREE\">THREE</a></span> - " |
|
399 |
+ "pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>", |
|
400 |
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#TWO\">TWO</a></span> - " |
|
401 |
+ "pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>"); |
|
33920 | 402 |
} |
403 |
||
404 |
void checkIndexNoComment() { |
|
405 |
// Test for search tags markup in index file when javadoc is executed with -nocomment. |
|
406 |
checkOutput("index-all.html", false, |
|
407 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
42263 | 408 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
36705 | 409 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">" |
42263 | 410 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
36705 | 411 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">" |
42263 | 412 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>", |
36705 | 413 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">" |
42263 | 414 |
+ "r</a></span> - Search tag in pkg</dt>", |
33920 | 415 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
42263 | 416 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 417 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 418 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 419 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
42263 | 420 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 421 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 422 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
33920 | 423 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
42263 | 424 |
+ "SingleWord</a></span> - Search tag in pkg</dt>", |
47300
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
425 |
"<div class=\"deprecationComment\">class_test1 passes. Search tag" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
426 |
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>", |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
427 |
"<div class=\"deprecationComment\">error_test3 passes. Search tag for\n" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
428 |
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></div>"); |
33920 | 429 |
checkOutput("index-all.html", true, |
430 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
42263 | 431 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 432 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 433 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>"); |
33920 | 434 |
} |
435 |
||
436 |
void checkIndexNoDeprecated() { |
|
437 |
// Test for search tags markup in index file when javadoc is executed using -nodeprecated. |
|
438 |
checkOutput("index-all.html", true, |
|
439 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
42263 | 440 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
33920 | 441 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
42263 | 442 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 443 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 444 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 445 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
42263 | 446 |
+ "SingleWord</a></span> - Search tag in pkg</dt>"); |
33920 | 447 |
checkOutput("index-all.html", false, |
448 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
|
42263 | 449 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 450 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 451 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
33920 | 452 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 453 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 454 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 455 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
47300
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
456 |
"<div class=\"deprecationComment\">class_test1 passes. Search tag" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
457 |
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>", |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
458 |
"<div class=\"deprecationComment\">error_test3 passes. Search tag for\n" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
459 |
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></div>"); |
33920 | 460 |
} |
461 |
||
462 |
void checkJavaFXOutput() { |
|
463 |
checkOutput("index-all.html", false, "test treat as private"); |
|
464 |
} |
|
465 |
||
466 |
void checkInvalidUsageIndexTag() { |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
467 |
checkOutput(Output.OUT, true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
468 |
"AnotherClass.java:29: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
469 |
"AnotherClass.java:41: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
470 |
"AnotherClass.java:36: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
471 |
"AnotherClass.java:70: warning - invalid usage of tag {@index"); |
33920 | 472 |
} |
473 |
||
474 |
void checkJqueryAndImageFiles(boolean expectedOutput) { |
|
475 |
checkFiles(expectedOutput, |
|
476 |
"search.js", |
|
477 |
"jquery/jquery-1.10.2.js", |
|
478 |
"jquery/jquery-ui.js", |
|
479 |
"jquery/jquery-ui.css", |
|
480 |
"jquery/jquery-ui.min.js", |
|
481 |
"jquery/jquery-ui.min.css", |
|
482 |
"jquery/jquery-ui.structure.min.css", |
|
483 |
"jquery/jquery-ui.structure.css", |
|
484 |
"jquery/external/jquery/jquery.js", |
|
485 |
"jquery/jszip/dist/jszip.js", |
|
486 |
"jquery/jszip/dist/jszip.min.js", |
|
487 |
"jquery/jszip-utils/dist/jszip-utils.js", |
|
488 |
"jquery/jszip-utils/dist/jszip-utils.min.js", |
|
489 |
"jquery/jszip-utils/dist/jszip-utils-ie.js", |
|
490 |
"jquery/jszip-utils/dist/jszip-utils-ie.min.js", |
|
491 |
"jquery/images/ui-bg_flat_0_aaaaaa_40x100.png", |
|
492 |
"jquery/images/ui-icons_454545_256x240.png", |
|
493 |
"jquery/images/ui-bg_glass_95_fef1ec_1x400.png", |
|
494 |
"jquery/images/ui-bg_glass_75_dadada_1x400.png", |
|
495 |
"jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png", |
|
496 |
"jquery/images/ui-icons_888888_256x240.png", |
|
497 |
"jquery/images/ui-icons_2e83ff_256x240.png", |
|
498 |
"jquery/images/ui-bg_glass_65_ffffff_1x400.png", |
|
499 |
"jquery/images/ui-icons_cd0a0a_256x240.png", |
|
500 |
"jquery/images/ui-bg_glass_55_fbf9ee_1x400.png", |
|
501 |
"jquery/images/ui-icons_222222_256x240.png", |
|
502 |
"jquery/images/ui-bg_glass_75_e6e6e6_1x400.png", |
|
503 |
"jquery/images/ui-bg_flat_75_ffffff_40x100.png", |
|
504 |
"resources/x.png", |
|
505 |
"resources/glass.png"); |
|
506 |
} |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
507 |
|
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
508 |
void checkSearchJS() { |
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
509 |
checkOutput("search.js", true, |
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
510 |
"camelCaseRegexp = ($.ui.autocomplete.escapeRegex(request.term)).split(/(?=[A-Z])/).join(\"([a-z0-9_$]*?)\");", |
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
511 |
"var camelCaseMatcher = new RegExp(\"^\" + camelCaseRegexp);", |
43762
515fe48569fe
8168965: search items are not listed in any sensible order
bpatel
parents:
43370
diff
changeset
|
512 |
"camelCaseMatcher.test(item.l)", |
515fe48569fe
8168965: search items are not listed in any sensible order
bpatel
parents:
43370
diff
changeset
|
513 |
"var secondaryresult = new Array();", |
515fe48569fe
8168965: search items are not listed in any sensible order
bpatel
parents:
43370
diff
changeset
|
514 |
"function nestedName(e) {", |
44296
e9bbaeab6f49
8176794: javadoc search results sorted incorrectly on packages
bpatel
parents:
43762
diff
changeset
|
515 |
"function sortAndConcatResults(a1, a2) {", |
e9bbaeab6f49
8176794: javadoc search results sorted incorrectly on packages
bpatel
parents:
43762
diff
changeset
|
516 |
"if (exactMatcher.test(item.l)) {\n" |
45496 | 517 |
+ " presult.unshift(item);", |
518 |
"$(\"#search\").on('click keydown', function() {\n" |
|
519 |
+ " if ($(this).val() == watermark) {\n" |
|
520 |
+ " $(this).val('').removeClass('watermark');\n" |
|
521 |
+ " }\n" |
|
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
522 |
+ " });", |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
523 |
"function getURLPrefix(ui) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
524 |
+ " var urlPrefix=\"\";\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
525 |
+ " if (useModuleDirectories) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
526 |
+ " var slash = \"/\";\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
527 |
+ " if (ui.item.category === catModules) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
528 |
+ " return ui.item.l + slash;\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
529 |
+ " } else if (ui.item.category === catPackages) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
530 |
+ " return ui.item.m + slash;\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
531 |
+ " } else if (ui.item.category === catTypes || ui.item.category === catMembers) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
532 |
+ " $.each(packageSearchIndex, function(index, item) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
533 |
+ " if (ui.item.p == item.l) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
534 |
+ " urlPrefix = item.m + slash;\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
535 |
+ " }\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
536 |
+ " });\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
537 |
+ " return urlPrefix;\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
538 |
+ " }\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
539 |
+ " }\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
540 |
+ " return urlPrefix;\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
541 |
+ "}"); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
542 |
} |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
543 |
|
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
544 |
void checkSingleIndexSearchTagDuplication() { |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
545 |
// Test for search tags duplication in index file. |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
546 |
checkOutput("index-all.html", true, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
547 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
548 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
549 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
550 |
checkOutput("index-all.html", false, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
551 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
552 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
553 |
+ "<dd>with description</dd>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
554 |
+ "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
555 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
556 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
557 |
} |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
558 |
|
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
559 |
void checkSplitIndexSearchTagDuplication() { |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
560 |
// Test for search tags duplication in index file. |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
561 |
checkOutput("index-files/index-13.html", true, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
562 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
563 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
564 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
565 |
checkOutput("index-files/index-13.html", false, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
566 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
567 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
568 |
+ "<dd>with description</dd>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
569 |
+ "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
570 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
571 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
572 |
} |
33920 | 573 |
} |