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