author | pmuthuswamy |
Tue, 23 Apr 2019 18:28:48 +0530 | |
changeset 54596 | 86c1da00dd6a |
parent 54589 | 3babb3ed24c6 |
child 54619 | b43cc3b9ef40 |
permissions | -rw-r--r-- |
33920 | 1 |
/* |
53562 | 2 |
* Copyright (c) 2015, 2019, 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 |
50293
edfb87b2520e
8196202: Javadoc should not generate frames by default
jjg
parents:
50167
diff
changeset
|
27 |
* 8181622 8182263 8074407 8187521 8198522 8182765 8199278 8196201 8196202 |
52961
d67b37917e82
8214468: jQuery UI upgrade from 1.11.4 to 1.12.1
pmuthuswamy
parents:
52695
diff
changeset
|
28 |
* 8184205 8214468 |
33920 | 29 |
* @summary Test the search feature of javadoc. |
30 |
* @author bpatel |
|
53097 | 31 |
* @library ../../lib |
36526 | 32 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
53097 | 33 |
* @build javadoc.tester.* |
33920 | 34 |
* @run main TestSearch |
35 |
*/ |
|
53097 | 36 |
import javadoc.tester.JavadocTester; |
37 |
||
33920 | 38 |
public class TestSearch extends JavadocTester { |
39 |
||
40 |
public static void main(String... args) throws Exception { |
|
41 |
TestSearch tester = new TestSearch(); |
|
42 |
tester.runTests(); |
|
43 |
} |
|
44 |
||
45 |
@Test |
|
53097 | 46 |
public void test1() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
47 |
javadoc("-d", "out-1", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
48 |
"-sourcepath", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
49 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
50 |
testSrc("UnnamedPkgClass.java")); |
33920 | 51 |
checkExit(Exit.OK); |
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
52 |
checkSearchOutput("UnnamedPkgClass.html", true, true); |
33920 | 53 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
54 |
checkSearchJS(); |
33920 | 55 |
checkFiles(false, |
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
56 |
"tag-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
57 |
"tag-search-index.js"); |
33920 | 58 |
checkFiles(true, |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
59 |
"package-search-index.zip", |
33920 | 60 |
"member-search-index.zip", |
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
61 |
"type-search-index.zip", |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
62 |
"package-search-index.js", |
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
63 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
64 |
"type-search-index.js"); |
33920 | 65 |
} |
66 |
||
67 |
@Test |
|
53097 | 68 |
public void test2() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
69 |
javadoc("-d", "out-2", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
70 |
"-Xdoclint:none", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
71 |
"-sourcepath", testSrc, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
72 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
73 |
"pkg", "pkg1", "pkg2", "pkg3"); |
33920 | 74 |
checkExit(Exit.OK); |
75 |
checkInvalidUsageIndexTag(); |
|
76 |
checkSearchOutput(true); |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
77 |
checkSingleIndex(true, true); |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
78 |
checkSingleIndexSearchTagDuplication(); |
33920 | 79 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
80 |
checkSearchJS(); |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
81 |
checkAllPkgsAllClasses(); |
33920 | 82 |
checkFiles(true, |
83 |
"member-search-index.zip", |
|
84 |
"package-search-index.zip", |
|
85 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
86 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
87 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
88 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
89 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
90 |
"type-search-index.js"); |
33920 | 91 |
} |
92 |
||
93 |
@Test |
|
53097 | 94 |
public void test2a() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
95 |
javadoc("-d", "out-2a", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
96 |
"-Xdoclint:all", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
97 |
"-sourcepath", testSrc, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
98 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
99 |
"pkg", "pkg1", "pkg2", "pkg3"); |
41451 | 100 |
checkExit(Exit.ERROR); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
101 |
checkDocLintErrors(); |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
102 |
checkSearchOutput(true); |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
103 |
checkSingleIndex(true, true); |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
104 |
checkSingleIndexSearchTagDuplication(); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
105 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
106 |
checkSearchJS(); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
107 |
checkFiles(true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
108 |
"member-search-index.zip", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
109 |
"package-search-index.zip", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
110 |
"tag-search-index.zip", |
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
111 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
112 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
113 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
114 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
115 |
"type-search-index.js"); |
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
116 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
117 |
|
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
118 |
@Test |
53097 | 119 |
public void test3() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
120 |
javadoc("-d", "out-3", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
121 |
"-noindex", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
122 |
"-Xdoclint:none", |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
123 |
"-sourcepath", testSrc, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
124 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
125 |
"pkg", "pkg1", "pkg2", "pkg3"); |
33920 | 126 |
checkExit(Exit.OK); |
127 |
checkSearchOutput(false); |
|
128 |
checkJqueryAndImageFiles(false); |
|
129 |
checkFiles(false, |
|
130 |
"member-search-index.zip", |
|
131 |
"package-search-index.zip", |
|
132 |
"tag-search-index.zip", |
|
133 |
"type-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
134 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
135 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
136 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
137 |
"type-search-index.js", |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
138 |
"index-all.html", |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
139 |
"allpackages-index.html", |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
140 |
"allclasses-index.html"); |
33920 | 141 |
} |
142 |
||
143 |
@Test |
|
53097 | 144 |
public void test4() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
145 |
javadoc("-d", "out-4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
146 |
"-html5", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
147 |
"-Xdoclint:none", |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
148 |
"-sourcepath", testSrc, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
149 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
150 |
"pkg", "pkg1", "pkg2", "pkg3"); |
33920 | 151 |
checkExit(Exit.OK); |
152 |
checkSearchOutput(true); |
|
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
153 |
checkSingleIndex(true, true); |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
154 |
checkSingleIndexSearchTagDuplication(); |
33920 | 155 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
156 |
checkSearchJS(); |
33920 | 157 |
checkFiles(true, |
158 |
"member-search-index.zip", |
|
159 |
"package-search-index.zip", |
|
160 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
161 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
162 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
163 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
164 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
165 |
"type-search-index.js"); |
33920 | 166 |
} |
167 |
||
168 |
@Test |
|
53097 | 169 |
public void test5() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
170 |
javadoc("-d", "out-5", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
171 |
"-html5", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
172 |
"-noindex", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
173 |
"-Xdoclint:none", |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
174 |
"-sourcepath", testSrc, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
175 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
176 |
"pkg", "pkg1", "pkg2", "pkg3"); |
33920 | 177 |
checkExit(Exit.OK); |
178 |
checkSearchOutput(false); |
|
179 |
checkJqueryAndImageFiles(false); |
|
180 |
checkFiles(false, |
|
181 |
"member-search-index.zip", |
|
182 |
"package-search-index.zip", |
|
183 |
"tag-search-index.zip", |
|
184 |
"type-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
185 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
186 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
187 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
188 |
"type-search-index.js", |
33920 | 189 |
"index-all.html"); |
190 |
} |
|
191 |
||
192 |
@Test |
|
53097 | 193 |
public void test6() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
194 |
javadoc("-d", "out-6", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
195 |
"-nocomment", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
196 |
"-Xdoclint:none", |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
197 |
"-sourcepath", testSrc, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
198 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
199 |
"pkg", "pkg1", "pkg2", "pkg3"); |
33920 | 200 |
checkExit(Exit.OK); |
201 |
checkSearchOutput(true); |
|
202 |
checkIndexNoComment(); |
|
203 |
checkJqueryAndImageFiles(true); |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
204 |
checkSearchJS(); |
33920 | 205 |
checkFiles(true, |
206 |
"member-search-index.zip", |
|
207 |
"package-search-index.zip", |
|
208 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
209 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
210 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
211 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
212 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
213 |
"type-search-index.js"); |
33920 | 214 |
} |
215 |
||
216 |
@Test |
|
53097 | 217 |
public void test7() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
218 |
javadoc("-d", "out-7", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
219 |
"-nodeprecated", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
220 |
"-Xdoclint:none", |
34567
c74f68484156
8144287: Enhance DocTree API to support @index javadoc tags.
ksrini
parents:
33920
diff
changeset
|
221 |
"-sourcepath", testSrc, |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
222 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
223 |
"pkg", "pkg1", "pkg2", "pkg3"); |
50370
676b7c44eeae
8202627: javadoc generates broken links to deprecated items when -nodeprecated is used
pmuthuswamy
parents:
50293
diff
changeset
|
224 |
|
33920 | 225 |
checkExit(Exit.OK); |
226 |
checkSearchOutput(true); |
|
227 |
checkIndexNoDeprecated(); |
|
228 |
checkJqueryAndImageFiles(true); |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
229 |
checkSearchJS(); |
33920 | 230 |
checkFiles(true, |
231 |
"member-search-index.zip", |
|
232 |
"package-search-index.zip", |
|
233 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
234 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
235 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
236 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
237 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
238 |
"type-search-index.js"); |
33920 | 239 |
} |
240 |
||
241 |
@Test |
|
53097 | 242 |
public void test8() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
243 |
javadoc("-d", "out-8", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
244 |
"-splitindex", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
245 |
"-Xdoclint:none", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
246 |
"-sourcepath", testSrc, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
247 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
248 |
"pkg", "pkg1", "pkg2", "pkg3"); |
33920 | 249 |
checkExit(Exit.OK); |
250 |
checkInvalidUsageIndexTag(); |
|
251 |
checkSearchOutput(true); |
|
252 |
checkSplitIndex(); |
|
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
253 |
checkSplitIndexSearchTagDuplication(); |
33920 | 254 |
checkJqueryAndImageFiles(true); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
255 |
checkSearchJS(); |
33920 | 256 |
checkFiles(true, |
257 |
"member-search-index.zip", |
|
258 |
"package-search-index.zip", |
|
259 |
"tag-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
260 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
261 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
262 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
263 |
"tag-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
264 |
"type-search-index.js"); |
33920 | 265 |
} |
266 |
||
267 |
@Test |
|
53097 | 268 |
public void test9() { |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
269 |
javadoc("-d", "out-9", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
270 |
"-sourcepath", testSrc, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
271 |
"-javafx", |
49879
601277b1d582
8025091: VisibleMemberMap.java possible performance improvements
ksrini
parents:
49427
diff
changeset
|
272 |
"--disable-javafx-strict-checks", |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
273 |
"-package", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
274 |
"-use", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
275 |
"pkgfx", "pkg3"); |
33920 | 276 |
checkExit(Exit.OK); |
277 |
checkSearchOutput(true); |
|
278 |
checkJavaFXOutput(); |
|
279 |
checkJqueryAndImageFiles(true); |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
280 |
checkSearchJS(); |
33920 | 281 |
checkFiles(false, |
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
282 |
"tag-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
283 |
"tag-search-index.js"); |
33920 | 284 |
checkFiles(true, |
285 |
"member-search-index.zip", |
|
286 |
"package-search-index.zip", |
|
43370
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
287 |
"type-search-index.zip", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
288 |
"member-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
289 |
"package-search-index.js", |
5969237f927c
8166175: javadoc search doesn't work on local doc bundles
bpatel
parents:
42263
diff
changeset
|
290 |
"type-search-index.js"); |
33920 | 291 |
} |
292 |
||
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
293 |
@Test |
53097 | 294 |
public void testURLEncoding() { |
49427
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
295 |
javadoc("-d", "out-encode-html5", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
296 |
"-Xdoclint:none", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
297 |
"-sourcepath", testSrc, |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
298 |
"-use", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
299 |
"pkg", "pkg1", "pkg2", "pkg3"); |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
300 |
checkExit(Exit.OK); |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
301 |
checkSearchJS(); |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
302 |
checkSearchIndex(true); |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
303 |
} |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
304 |
|
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
305 |
@Test |
53097 | 306 |
public void testJapaneseLocale() { |
52695
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
307 |
javadoc("-locale", "ja_JP", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
308 |
"-d", "out-jp", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
309 |
"-Xdoclint:none", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
310 |
"-sourcepath", testSrc, |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
311 |
"-use", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
312 |
"pkg", "pkg1", "pkg2", "pkg3"); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
313 |
checkExit(Exit.OK); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
314 |
checkOutput(Output.OUT, true, |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
315 |
"\u30d1\u30c3\u30b1\u30fc\u30b8pkg\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1" + |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
316 |
"\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...\n", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
317 |
"\u30d1\u30c3\u30b1\u30fc\u30b8pkg1\u306e\u30bd\u30fc\u30b9\u30fb\u30d5\u30a1" + |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
318 |
"\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3093\u3067\u3044\u307e\u3059...\n"); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
319 |
checkSearchJS(); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
320 |
checkSearchIndex(true); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
321 |
} |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
322 |
|
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
323 |
@Test |
53097 | 324 |
public void testChineseLocale() { |
52695
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
325 |
javadoc("-locale", "zh_CN", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
326 |
"-d", "out-cn", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
327 |
"-Xdoclint:none", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
328 |
"-sourcepath", testSrc, |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
329 |
"-use", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
330 |
"pkg", "pkg1", "pkg2", "pkg3"); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
331 |
checkExit(Exit.OK); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
332 |
checkOutput(Output.OUT, true, |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
333 |
"\u6b63\u5728\u52a0\u8f7d\u7a0b\u5e8f\u5305pkg\u7684\u6e90\u6587\u4ef6...\n", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
334 |
"\u6b63\u5728\u52a0\u8f7d\u7a0b\u5e8f\u5305pkg1\u7684\u6e90\u6587\u4ef6...\n", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
335 |
"\u6b63\u5728\u52a0\u8f7d\u7a0b\u5e8f\u5305pkg2\u7684\u6e90\u6587\u4ef6...\n", |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
336 |
"\u6b63\u5728\u52a0\u8f7d\u7a0b\u5e8f\u5305pkg3\u7684\u6e90\u6587\u4ef6...\n"); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
337 |
checkSearchJS(); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
338 |
checkSearchIndex(true); |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
339 |
} |
99eb43bc3595
8213716: javadoc search not working with Japanese and Chinese locales
hannesw
parents:
52616
diff
changeset
|
340 |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
341 |
void checkDocLintErrors() { |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
342 |
checkOutput(Output.OUT, true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
343 |
"A sample method. Testing search tag for {@index \"unclosed quote}.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
344 |
"Another test class. Testing empty {@index }.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
345 |
"Constant field. Testing no text in index tag {@index}.", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
346 |
"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
|
347 |
} |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
348 |
|
33920 | 349 |
void checkSearchOutput(boolean expectedOutput) { |
54350
4f9772f4403d
8215599: Remove support for javadoc "frames" mode
pmuthuswamy
parents:
54137
diff
changeset
|
350 |
checkSearchOutput("index.html", expectedOutput, true); |
33920 | 351 |
} |
352 |
||
49427
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
353 |
void checkSearchIndex(boolean expectedOutput) { |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
354 |
checkOutput("member-search-index.js", expectedOutput, |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
355 |
"{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"AnotherClass()\",\"url\":\"%3Cinit%3E()\"}", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
356 |
"{\"p\":\"pkg1\",\"c\":\"RegClass\",\"l\":\"RegClass()\",\"url\":\"%3Cinit%3E()\"}", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
357 |
"{\"p\":\"pkg2\",\"c\":\"TestError\",\"l\":\"TestError()\",\"url\":\"%3Cinit%3E()\"}", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
358 |
"{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"method(byte[], int, String)\",\"url\":\"method(byte[],int,java.lang.String)\"}"); |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
359 |
checkOutput("member-search-index.js", !expectedOutput, |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
360 |
"{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"method(RegClass)\",\"url\":\"method-pkg1.RegClass-\"}", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
361 |
"{\"p\":\"pkg2\",\"c\":\"TestClass\",\"l\":\"TestClass()\",\"url\":\"TestClass--\"}", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
362 |
"{\"p\":\"pkg\",\"c\":\"TestError\",\"l\":\"TestError()\",\"url\":\"TestError--\"}", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
363 |
"{\"p\":\"pkg\",\"c\":\"AnotherClass\",\"l\":\"method(byte[], int, String)\",\"url\":\"method-byte:A-int-java.lang.String-\"}"); |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
364 |
} |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
365 |
|
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
366 |
void checkSearchOutput(boolean expectedOutput, boolean moduleDirectoriesVar) { |
54350
4f9772f4403d
8215599: Remove support for javadoc "frames" mode
pmuthuswamy
parents:
54137
diff
changeset
|
367 |
checkSearchOutput("index.html", expectedOutput, moduleDirectoriesVar); |
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
368 |
} |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
369 |
|
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
370 |
void checkSearchOutput(String fileName, boolean expectedOutput, boolean moduleDirectoriesVar) { |
33920 | 371 |
// Test for search related markup |
372 |
checkOutput(fileName, expectedOutput, |
|
54531 | 373 |
"<link rel=\"stylesheet\" type=\"text/css\" href=\"script-dir/jquery-ui.css\" title=\"Style\">\n", |
374 |
"<script type=\"text/javascript\" src=\"script-dir/jszip/dist/jszip.min.js\"></script>\n", |
|
375 |
"<script type=\"text/javascript\" src=\"script-dir/jszip-utils/dist/jszip-utils.min.js\"></script>\n", |
|
33920 | 376 |
"<!--[if IE]>\n", |
54531 | 377 |
"<script type=\"text/javascript\" src=\"script-dir/jszip-utils/dist/jszip-utils-ie.min.js\"></script>\n", |
33920 | 378 |
"<![endif]-->\n", |
54531 | 379 |
"<script type=\"text/javascript\" src=\"script-dir/jquery-3.3.1.js\"></script>\n", |
380 |
"<script type=\"text/javascript\" src=\"script-dir/jquery-migrate-3.0.1.js\"></script>\n", |
|
381 |
"<script type=\"text/javascript\" src=\"script-dir/jquery-ui.js\"></script>", |
|
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
382 |
"var pathtoroot = \"./\";\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
383 |
+ "loadScripts(document, 'script');", |
54596
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54589
diff
changeset
|
384 |
"<div class=\"navListSearch\">", |
86c1da00dd6a
8219998: Eliminate inherently singleton lists
pmuthuswamy
parents:
54589
diff
changeset
|
385 |
"<label for=\"search\">SEARCH:</label>\n" |
47047
91082c3c1d05
8182263: Search box and reset button needs to be a11y fixed.
bpatel
parents:
45913
diff
changeset
|
386 |
+ "<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
|
387 |
+ "<input type=\"reset\" id=\"reset\" value=\"reset\" disabled=\"disabled\">\n"); |
33920 | 388 |
checkOutput(fileName, true, |
389 |
"<div class=\"fixedNav\">"); |
|
390 |
} |
|
391 |
||
47328
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
392 |
void checkSingleIndex(boolean expectedOutput, boolean html5) { |
d18df41954ba
8187521: In some corner cases the javadoc tool can reuse id attribute
jjg
parents:
47300
diff
changeset
|
393 |
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
|
394 |
|
33920 | 395 |
// Test for search tags markup in index file. |
396 |
checkOutput("index-all.html", expectedOutput, |
|
397 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
42263 | 398 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
36705 | 399 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">" |
42263 | 400 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
36705 | 401 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">" |
42263 | 402 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>", |
36705 | 403 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">" |
42263 | 404 |
+ "r</a></span> - Search tag in pkg</dt>", |
33920 | 405 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
42263 | 406 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 407 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 408 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 409 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
42263 | 410 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 411 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 412 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
413 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
414 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
|
33920 | 415 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 416 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 417 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 418 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 419 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 420 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 421 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
42263 | 422 |
+ "SingleWord</a></span> - Search tag in pkg</dt>", |
33920 | 423 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html" |
42263 | 424 |
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - " |
425 |
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>", |
|
33920 | 426 |
"<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
|
427 |
+ "#" + html_span_see_span + "\">html <span> see </span></a></span> - Search " |
42263 | 428 |
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>", |
33920 | 429 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.html#quoted\">quoted</a>" |
42263 | 430 |
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>", |
431 |
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#ONE\">ONE</a></span> - " |
|
432 |
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>", |
|
433 |
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#THREE\">THREE</a></span> - " |
|
434 |
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>", |
|
435 |
"<dt><span class=\"memberNameLink\"><a href=\"pkg2/TestEnum.html#TWO\">TWO</a></span> - " |
|
436 |
+ "pkg2.<a href=\"pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>"); |
|
33920 | 437 |
checkOutput("index-all.html", true, |
47300
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
438 |
"<div class=\"deprecationComment\">class_test1 passes. Search tag" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
439 |
+ " <a id=\"SearchTagDeprecatedClass\" class=\"searchTagResult\">SearchTagDeprecatedClass</a></div>", |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
440 |
"<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
|
441 |
+ " method <a id=\"SearchTagDeprecatedMethod\" class=\"searchTagResult\">SearchTagDeprecatedMethod</a></div>"); |
33920 | 442 |
} |
443 |
||
444 |
void checkSplitIndex() { |
|
445 |
// Test for search tags markup in split index file. |
|
42263 | 446 |
checkOutput("index-files/index-13.html", true, |
33920 | 447 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#searchphrase\">" |
42263 | 448 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 449 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 450 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 451 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
42263 | 452 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 453 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 454 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
33920 | 455 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 456 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 457 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 458 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 459 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 460 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 461 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 462 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>", |
33920 | 463 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#SingleWord\">" |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
464 |
+ "SingleWord</a></span> - Search tag in pkg</dt>", |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
465 |
"<br><a href=\"../allclasses-index.html\">All Classes</a> " |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
466 |
+ "<a href=\"../allpackages-index.html\">All Packages</a>"); |
42263 | 467 |
checkOutput("index-files/index-10.html", true, |
33920 | 468 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#phrasewithspaces\">" |
42263 | 469 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
36705 | 470 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg\">" |
42263 | 471 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
36705 | 472 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#pkg2.5\">" |
42263 | 473 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>"); |
474 |
checkOutput("index-files/index-12.html", true, |
|
36705 | 475 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#r\">" |
42263 | 476 |
+ "r</a></span> - Search tag in pkg</dt>"); |
33920 | 477 |
checkOutput("index-files/index-8.html", true, |
478 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html" |
|
42263 | 479 |
+ "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - " |
480 |
+ "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>"); |
|
33920 | 481 |
checkOutput("index-files/index-5.html", true, |
482 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html" |
|
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
48991
diff
changeset
|
483 |
+ "#html%3Cspan%3Esee%3C/span%3E\">html <span> see </span></a></span> - Search " |
42263 | 484 |
+ "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>"); |
485 |
checkOutput("index-files/index-11.html", true, |
|
33920 | 486 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>" |
42263 | 487 |
+ "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>"); |
488 |
checkOutput("index-files/index-9.html", true, |
|
489 |
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#ONE\">ONE</a>" |
|
490 |
+ "</span> - pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>"); |
|
491 |
checkOutput("index-files/index-14.html", true, |
|
492 |
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#THREE\">THREE</a></span> - " |
|
493 |
+ "pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>", |
|
494 |
"<dt><span class=\"memberNameLink\"><a href=\"../pkg2/TestEnum.html#TWO\">TWO</a></span> - " |
|
495 |
+ "pkg2.<a href=\"../pkg2/TestEnum.html\" title=\"enum in pkg2\">TestEnum</a></dt>"); |
|
33920 | 496 |
} |
497 |
||
498 |
void checkIndexNoComment() { |
|
499 |
// Test for search tags markup in index file when javadoc is executed with -nocomment. |
|
500 |
checkOutput("index-all.html", false, |
|
501 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
42263 | 502 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
36705 | 503 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg\">" |
42263 | 504 |
+ "pkg</a></span> - Search tag in pkg</dt>", |
36705 | 505 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#pkg2.5\">" |
42263 | 506 |
+ "pkg2.5</a></span> - Search tag in pkg</dt>", |
36705 | 507 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#r\">" |
42263 | 508 |
+ "r</a></span> - Search tag in pkg</dt>", |
33920 | 509 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
42263 | 510 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 511 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 512 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 513 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
42263 | 514 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 515 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 516 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
33920 | 517 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
42263 | 518 |
+ "SingleWord</a></span> - Search tag in pkg</dt>", |
47300
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
519 |
"<div class=\"deprecationComment\">class_test1 passes. Search tag" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
520 |
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>", |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
521 |
"<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
|
522 |
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></div>"); |
33920 | 523 |
checkOutput("index-all.html", true, |
524 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
|
42263 | 525 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 526 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 527 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>"); |
33920 | 528 |
} |
529 |
||
530 |
void checkIndexNoDeprecated() { |
|
531 |
// Test for search tags markup in index file when javadoc is executed using -nodeprecated. |
|
532 |
checkOutput("index-all.html", true, |
|
533 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">" |
|
42263 | 534 |
+ "phrase with spaces</a></span> - Search tag in pkg</dt>", |
33920 | 535 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">" |
42263 | 536 |
+ "search phrase</a></span> - Search tag in pkg1.RegClass</dt>", |
33920 | 537 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">" |
42263 | 538 |
+ "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>", |
33920 | 539 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">" |
42263 | 540 |
+ "SingleWord</a></span> - Search tag in pkg</dt>"); |
33920 | 541 |
checkOutput("index-all.html", false, |
542 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">" |
|
42263 | 543 |
+ "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>", |
33920 | 544 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">" |
42263 | 545 |
+ "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>", |
33920 | 546 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">" |
42263 | 547 |
+ "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>", |
33920 | 548 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
42263 | 549 |
+ "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
|
550 |
"<div class=\"deprecationComment\">class_test1 passes. Search tag" |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
551 |
+ " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></div>", |
a905ce398074
8074407: javadoc: using <pre> after @deprecated tag causes warnings
bpatel
parents:
47216
diff
changeset
|
552 |
"<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
|
553 |
+ " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></div>"); |
33920 | 554 |
} |
555 |
||
556 |
void checkJavaFXOutput() { |
|
557 |
checkOutput("index-all.html", false, "test treat as private"); |
|
558 |
} |
|
559 |
||
560 |
void checkInvalidUsageIndexTag() { |
|
35426
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
561 |
checkOutput(Output.OUT, true, |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
562 |
"AnotherClass.java:29: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
563 |
"AnotherClass.java:41: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
564 |
"AnotherClass.java:36: warning - invalid usage of tag {@index", |
374342e56a56
8035473: [javadoc] Revamp the existing Doclet APIs
ksrini
parents:
34567
diff
changeset
|
565 |
"AnotherClass.java:70: warning - invalid usage of tag {@index"); |
33920 | 566 |
} |
567 |
||
568 |
void checkJqueryAndImageFiles(boolean expectedOutput) { |
|
569 |
checkFiles(expectedOutput, |
|
570 |
"search.js", |
|
54531 | 571 |
"script-dir/jquery-3.3.1.js", |
572 |
"script-dir/jquery-migrate-3.0.1.js", |
|
573 |
"script-dir/jquery-ui.js", |
|
574 |
"script-dir/jquery-ui.css", |
|
575 |
"script-dir/jquery-ui.min.js", |
|
576 |
"script-dir/jquery-ui.min.css", |
|
577 |
"script-dir/jquery-ui.structure.min.css", |
|
578 |
"script-dir/jquery-ui.structure.css", |
|
579 |
"script-dir/external/jquery/jquery.js", |
|
580 |
"script-dir/jszip/dist/jszip.js", |
|
581 |
"script-dir/jszip/dist/jszip.min.js", |
|
582 |
"script-dir/jszip-utils/dist/jszip-utils.js", |
|
583 |
"script-dir/jszip-utils/dist/jszip-utils.min.js", |
|
584 |
"script-dir/jszip-utils/dist/jszip-utils-ie.js", |
|
585 |
"script-dir/jszip-utils/dist/jszip-utils-ie.min.js", |
|
586 |
"script-dir/images/ui-bg_glass_65_dadada_1x400.png", |
|
587 |
"script-dir/images/ui-icons_454545_256x240.png", |
|
588 |
"script-dir/images/ui-bg_glass_95_fef1ec_1x400.png", |
|
589 |
"script-dir/images/ui-bg_glass_75_dadada_1x400.png", |
|
590 |
"script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png", |
|
591 |
"script-dir/images/ui-icons_888888_256x240.png", |
|
592 |
"script-dir/images/ui-icons_2e83ff_256x240.png", |
|
593 |
"script-dir/images/ui-icons_cd0a0a_256x240.png", |
|
594 |
"script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png", |
|
595 |
"script-dir/images/ui-icons_222222_256x240.png", |
|
596 |
"script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png", |
|
33920 | 597 |
"resources/x.png", |
598 |
"resources/glass.png"); |
|
599 |
} |
|
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
600 |
|
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
601 |
void checkSearchJS() { |
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
602 |
checkOutput("search.js", true, |
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
603 |
"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
|
604 |
"var camelCaseMatcher = new RegExp(\"^\" + camelCaseRegexp);", |
43762
515fe48569fe
8168965: search items are not listed in any sensible order
bpatel
parents:
43370
diff
changeset
|
605 |
"camelCaseMatcher.test(item.l)", |
515fe48569fe
8168965: search items are not listed in any sensible order
bpatel
parents:
43370
diff
changeset
|
606 |
"var secondaryresult = new Array();", |
515fe48569fe
8168965: search items are not listed in any sensible order
bpatel
parents:
43370
diff
changeset
|
607 |
"function nestedName(e) {", |
50856
1857ca5aca37
8190876: javadoc search on "java.se" shows "java.se" the last one among other modules
hannesw
parents:
50575
diff
changeset
|
608 |
"function concatResults(a1, a2) {", |
44296
e9bbaeab6f49
8176794: javadoc search results sorted incorrectly on packages
bpatel
parents:
43762
diff
changeset
|
609 |
"if (exactMatcher.test(item.l)) {\n" |
50856
1857ca5aca37
8190876: javadoc search on "java.se" shows "java.se" the last one among other modules
hannesw
parents:
50575
diff
changeset
|
610 |
+ " presult.push(item);", |
54358 | 611 |
"$(\"#search\").on('click keydown paste', function() {\n" |
45496 | 612 |
+ " if ($(this).val() == watermark) {\n" |
613 |
+ " $(this).val('').removeClass('watermark');\n" |
|
614 |
+ " }\n" |
|
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
615 |
+ " });", |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
616 |
"function getURLPrefix(ui) {\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
617 |
+ " var urlPrefix=\"\";\n" |
54589
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
618 |
+ " var slash = \"/\";\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
619 |
+ " if (ui.item.category === catModules) {\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
620 |
+ " return ui.item.l + slash;\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
621 |
+ " } else if (ui.item.category === catPackages && ui.item.m) {\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
622 |
+ " return ui.item.m + slash;\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
623 |
+ " } else if ((ui.item.category === catTypes && ui.item.p) || ui.item.category === catMembers) {\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
624 |
+ " $.each(packageSearchIndex, function(index, item) {\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
625 |
+ " if (item.m && ui.item.p == item.l) {\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
626 |
+ " urlPrefix = item.m + slash;\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
627 |
+ " }\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
628 |
+ " });\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
629 |
+ " return urlPrefix;\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
630 |
+ " } else {\n" |
3babb3ed24c6
8215580: Remove support for `--no-module-directories`
pmuthuswamy
parents:
54531
diff
changeset
|
631 |
+ " return urlPrefix;\n" |
48991
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
632 |
+ " }\n" |
978c3036fbfc
8198522: Javadoc search broken after output files organization for modules
bpatel
parents:
47328
diff
changeset
|
633 |
+ " return urlPrefix;\n" |
49427
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
634 |
+ "}", |
d2fd2581325b
8199278: Javadoc search results does not link to anchors on a page
bpatel
parents:
49139
diff
changeset
|
635 |
"url += ui.item.l;"); |
41523
da4f500b886d
8141636: Javadoc search should support camelCase search
bpatel
parents:
41451
diff
changeset
|
636 |
} |
45913
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
637 |
|
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
638 |
void checkSingleIndexSearchTagDuplication() { |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
639 |
// Test for search tags duplication in index file. |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
640 |
checkOutput("index-all.html", true, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
641 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
642 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
643 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
644 |
checkOutput("index-all.html", false, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
645 |
"<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
646 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
647 |
+ "<dd>with description</dd>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
648 |
+ "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
649 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
650 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
651 |
} |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
652 |
|
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
653 |
void checkSplitIndexSearchTagDuplication() { |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
654 |
// Test for search tags duplication in index file. |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
655 |
checkOutput("index-files/index-13.html", true, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
656 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
657 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
658 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
659 |
checkOutput("index-files/index-13.html", false, |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
660 |
"<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
661 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
662 |
+ "<dd>with description</dd>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
663 |
+ "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
664 |
+ "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>\n" |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
665 |
+ "<dd>with description</dd>"); |
90f6a96c1603
8181622: new {@index} tag generates multiple index entries
bpatel
parents:
45496
diff
changeset
|
666 |
} |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
667 |
|
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
668 |
void checkAllPkgsAllClasses() { |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
669 |
checkOutput("allclasses-index.html", true, |
52616
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
670 |
"<div class=\"typeSummary\">\n" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
671 |
+ "<div role=\"tablist\" aria-orientation=\"horizontal\"><button role=\"tab\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
672 |
+ " aria-selected=\"true\" aria-controls=\"typeSummary_tabpanel\" tabindex=\"0\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
673 |
+ " onkeydown=\"switchTab(event)\" id=\"t0\" class=\"activeTableTab\">All Classes</button>" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
674 |
+ "<button role=\"tab\" aria-selected=\"false\" aria-controls=\"typeSummary_tabpanel\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
675 |
+ " tabindex=\"-1\" onkeydown=\"switchTab(event)\" id=\"t1\" class=\"tableTab\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
676 |
+ " onclick=\"show(1);\">Interface Summary</button><button role=\"tab\" aria-selected=\"false\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
677 |
+ " aria-controls=\"typeSummary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
678 |
+ " id=\"t2\" class=\"tableTab\" onclick=\"show(2);\">Class Summary</button><button role=\"tab\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
679 |
+ " aria-selected=\"false\" aria-controls=\"typeSummary_tabpanel\" tabindex=\"-1\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
680 |
+ " onkeydown=\"switchTab(event)\" id=\"t3\" class=\"tableTab\" onclick=\"show(4);\">" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
681 |
+ "Enum Summary</button><button role=\"tab\" aria-selected=\"false\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
682 |
+ " aria-controls=\"typeSummary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
683 |
+ " id=\"t4\" class=\"tableTab\" onclick=\"show(8);\">Exception Summary</button><button role=\"tab\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
684 |
+ " aria-selected=\"false\" aria-controls=\"typeSummary_tabpanel\" tabindex=\"-1\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
685 |
+ " onkeydown=\"switchTab(event)\" id=\"t5\" class=\"tableTab\" onclick=\"show(16);\">" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
686 |
+ "Error Summary</button><button role=\"tab\" aria-selected=\"false\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
687 |
+ " aria-controls=\"typeSummary_tabpanel\" tabindex=\"-1\" onkeydown=\"switchTab(event)\"" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
688 |
+ " id=\"t6\" class=\"tableTab\" onclick=\"show(32);\">Annotation Types Summary</button></div>\n" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
689 |
+ "<div id=\"typeSummary_tabpanel\" role=\"tabpanel\">\n" |
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
690 |
+ "<table aria-labelledby=\"t0\">\n" |
54137
943cfab99051
8219691: method summary table head should be enclosed in <thead>
jjg
parents:
53562
diff
changeset
|
691 |
+ "<thead>\n" |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
692 |
+ "<tr>\n" |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
693 |
+ "<th class=\"colFirst\" scope=\"col\">Class</th>\n" |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
694 |
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
695 |
+ "</tr>", |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
696 |
"var data = {\"i0\":32,\"i1\":2,\"i2\":4,\"i3\":2,\"i4\":2,\"i5\":1,\"i6\":2,\"i7\":32," |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
697 |
+ "\"i8\":2,\"i9\":4,\"i10\":16,\"i11\":16,\"i12\":8,\"i13\":8,\"i14\":1,\"i15\":2};"); |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
698 |
checkOutput("allpackages-index.html", true, |
52616
1a395165c09b
8184205: Captions on tabbed tables are squashed together
pmuthuswamy
parents:
50856
diff
changeset
|
699 |
"<div class=\"packagesSummary\">\n<table>\n" |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
700 |
+ "<caption><span>Package Summary</span><span class=\"tabEnd\"> </span></caption>\n" |
54137
943cfab99051
8219691: method summary table head should be enclosed in <thead>
jjg
parents:
53562
diff
changeset
|
701 |
+ "<thead>\n" |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
702 |
+ "<tr>\n" |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
703 |
+ "<th class=\"colFirst\" scope=\"col\">Package</th>\n" |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
704 |
+ "<th class=\"colLast\" scope=\"col\">Description</th>\n" |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
705 |
+ "</tr>\n"); |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
706 |
checkOutput("type-search-index.js", true, |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
707 |
"{\"l\":\"All Classes\",\"url\":\"allclasses-index.html\"}"); |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
708 |
checkOutput("package-search-index.js", true, |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
709 |
"{\"l\":\"All Packages\",\"url\":\"allpackages-index.html\"}"); |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
710 |
checkOutput("index-all.html", true, |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
711 |
"<br><a href=\"allclasses-index.html\">All Classes</a> " |
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
712 |
+ "<a href=\"allpackages-index.html\">All Packages</a>"); |
33920 | 713 |
} |
50167
cc705c956798
8196201: Generate pages to list all classes and all packages in javadoc output
bpatel
parents:
50118
diff
changeset
|
714 |
} |