TestSearch.java revision 3294:9adfb22ff08f
1139749Simp/*
2121468Ssimokawa * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
3121468Ssimokawa * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4121468Ssimokawa *
5121468Ssimokawa * This code is free software; you can redistribute it and/or modify it
6121468Ssimokawa * under the terms of the GNU General Public License version 2 only, as
7121468Ssimokawa * published by the Free Software Foundation.
8121468Ssimokawa *
9121468Ssimokawa * This code is distributed in the hope that it will be useful, but WITHOUT
10121468Ssimokawa * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11121468Ssimokawa * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12121468Ssimokawa * version 2 for more details (a copy is included in the LICENSE file that
13121468Ssimokawa * accompanied this code).
14121468Ssimokawa *
15121468Ssimokawa * You should have received a copy of the GNU General Public License version
16121468Ssimokawa * 2 along with this work; if not, write to the Free Software Foundation,
17121468Ssimokawa * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18121468Ssimokawa *
19121468Ssimokawa * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20121468Ssimokawa * or visit www.oracle.com if you need additional information or have any
21121468Ssimokawa * questions.
22121468Ssimokawa */
23121468Ssimokawa
24121468Ssimokawa/*
25121468Ssimokawa * @test
26121468Ssimokawa * @bug 8141492
27121468Ssimokawa * @summary Test the search feature of javadoc.
28121468Ssimokawa * @author bpatel
29121468Ssimokawa * @library ../lib
30121468Ssimokawa * @modules jdk.javadoc/jdk.javadoc.internal.tool
31121468Ssimokawa * @build JavadocTester
32121468Ssimokawa * @run main TestSearch
33121468Ssimokawa */
34121468Ssimokawa
35121468Ssimokawapublic class TestSearch extends JavadocTester {
36121468Ssimokawa
37121468Ssimokawa    public static void main(String... args) throws Exception {
38121468Ssimokawa        TestSearch tester = new TestSearch();
39121468Ssimokawa        tester.runTests();
40129879Sphk    }
41121468Ssimokawa
42121468Ssimokawa    @Test
43121468Ssimokawa    void test1() {
44121468Ssimokawa        javadoc("-d", "out-1", "-sourcepath", "-use", testSrc("UnnamedPkgClass.java"));
45121468Ssimokawa        checkExit(Exit.OK);
46121468Ssimokawa        checkSearchOutput("UnnamedPkgClass.html", true);
47121468Ssimokawa        checkJqueryAndImageFiles(true);
48121468Ssimokawa        checkFiles(false,
49121468Ssimokawa                "package-search-index.zip",
50121468Ssimokawa                "tag-search-index.zip");
51121468Ssimokawa        checkFiles(true,
52121468Ssimokawa                "member-search-index.zip",
53136467Ssimokawa                "type-search-index.zip");
54121468Ssimokawa    }
55125862Ssimokawa
56125862Ssimokawa    @Test
57277505Swill    void test2() {
58170420Ssimokawa        javadoc("-d", "out-2", "-Xdoclint:none", "-sourcepath", testSrc,
59170420Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
60170420Ssimokawa        checkExit(Exit.OK);
61170420Ssimokawa        checkInvalidUsageIndexTag();
62170420Ssimokawa        checkSearchOutput(true);
63277505Swill        checkSingleIndex(true);
64121468Ssimokawa        checkJqueryAndImageFiles(true);
65121468Ssimokawa        checkFiles(true,
66170018Ssimokawa                "member-search-index.zip",
67125862Ssimokawa                "package-search-index.zip",
68125862Ssimokawa                "tag-search-index.zip",
69121468Ssimokawa                "type-search-index.zip");
70121468Ssimokawa    }
71121468Ssimokawa
72121468Ssimokawa    @Test
73121468Ssimokawa    void test2a() {
74121468Ssimokawa        javadoc("-d", "out-2a", "-Xdoclint:all", "-sourcepath", testSrc,
75121468Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
76121468Ssimokawa        checkExit(Exit.FAILED);
77121468Ssimokawa        checkDocLintErrors();
78121468Ssimokawa        checkSearchOutput(true);
79121468Ssimokawa        checkSingleIndex(true);
80170408Ssimokawa        checkJqueryAndImageFiles(true);
81121468Ssimokawa        checkFiles(true,
82121468Ssimokawa                "member-search-index.zip",
83121468Ssimokawa                "package-search-index.zip",
84121468Ssimokawa                "tag-search-index.zip",
85121468Ssimokawa                "type-search-index.zip");
86121468Ssimokawa    }
87121468Ssimokawa
88121468Ssimokawa    @Test
89121468Ssimokawa    void test3() {
90121468Ssimokawa        javadoc("-d", "out-3", "-noindex", "-Xdoclint:none",
91121468Ssimokawa                "-sourcepath", testSrc,
92121468Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
93121468Ssimokawa        checkExit(Exit.OK);
94121468Ssimokawa        checkSearchOutput(false);
95121468Ssimokawa        checkJqueryAndImageFiles(false);
96121468Ssimokawa        checkFiles(false,
97121468Ssimokawa                "member-search-index.zip",
98121468Ssimokawa                "package-search-index.zip",
99121468Ssimokawa                "tag-search-index.zip",
100121468Ssimokawa                "type-search-index.zip",
101121468Ssimokawa                "index-all.html");
102121468Ssimokawa    }
103277505Swill
104121468Ssimokawa    @Test
105170420Ssimokawa    void test4() {
106170420Ssimokawa        javadoc("-d", "out-4", "-html5", "-Xdoclint:none",
107170420Ssimokawa                "-sourcepath", testSrc,
108170420Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
109170420Ssimokawa        checkExit(Exit.OK);
110170420Ssimokawa        checkSearchOutput(true);
111170420Ssimokawa        checkSingleIndex(true);
112170420Ssimokawa        checkJqueryAndImageFiles(true);
113170420Ssimokawa        checkFiles(true,
114170420Ssimokawa                "member-search-index.zip",
115170420Ssimokawa                "package-search-index.zip",
116277505Swill                "tag-search-index.zip",
117170420Ssimokawa                "type-search-index.zip");
118121468Ssimokawa    }
119121468Ssimokawa
120121468Ssimokawa    @Test
121121468Ssimokawa    void test5() {
122121468Ssimokawa        javadoc("-d", "out-5", "-noindex", "-html5", "-Xdoclint:none",
123121468Ssimokawa                "-sourcepath", testSrc,
124121468Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
125121468Ssimokawa        checkExit(Exit.OK);
126121468Ssimokawa        checkSearchOutput(false);
127121468Ssimokawa        checkJqueryAndImageFiles(false);
128121468Ssimokawa        checkFiles(false,
129121468Ssimokawa                "member-search-index.zip",
130121468Ssimokawa                "package-search-index.zip",
131121468Ssimokawa                "tag-search-index.zip",
132121468Ssimokawa                "type-search-index.zip",
133121468Ssimokawa                "index-all.html");
134121468Ssimokawa    }
135121468Ssimokawa
136121468Ssimokawa    @Test
137277505Swill    void test6() {
138170420Ssimokawa        javadoc("-d", "out-6", "-nocomment", "-Xdoclint:none",
139170420Ssimokawa                "-sourcepath", testSrc,
140121468Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
141121468Ssimokawa        checkExit(Exit.OK);
142121468Ssimokawa        checkSearchOutput(true);
143121468Ssimokawa        checkIndexNoComment();
144121468Ssimokawa        checkJqueryAndImageFiles(true);
145122310Ssimokawa        checkFiles(true,
146121468Ssimokawa                "member-search-index.zip",
147121468Ssimokawa                "package-search-index.zip",
148121468Ssimokawa                "tag-search-index.zip",
149121468Ssimokawa                "type-search-index.zip");
150122310Ssimokawa    }
151122310Ssimokawa
152122310Ssimokawa    @Test
153122310Ssimokawa    void test7() {
154122310Ssimokawa        javadoc("-d", "out-7", "-nodeprecated", "-Xdoclint:none",
155122310Ssimokawa                "-sourcepath", testSrc,
156122310Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
157122310Ssimokawa        checkExit(Exit.OK);
158122310Ssimokawa        checkSearchOutput(true);
159122310Ssimokawa        checkIndexNoDeprecated();
160122310Ssimokawa        checkJqueryAndImageFiles(true);
161125862Ssimokawa        checkFiles(true,
162125862Ssimokawa                "member-search-index.zip",
163122310Ssimokawa                "package-search-index.zip",
164125862Ssimokawa                "tag-search-index.zip",
165125862Ssimokawa                "type-search-index.zip");
166125862Ssimokawa    }
167125862Ssimokawa
168121468Ssimokawa    @Test
169121468Ssimokawa    void test8() {
170170408Ssimokawa        javadoc("-d", "out-8", "-splitindex", "-Xdoclint:none", "-sourcepath", testSrc,
171170408Ssimokawa                "-use", "pkg", "pkg1", "pkg2", "pkg3");
172170408Ssimokawa        checkExit(Exit.OK);
173170408Ssimokawa        checkInvalidUsageIndexTag();
174170408Ssimokawa        checkSearchOutput(true);
175170408Ssimokawa        checkSplitIndex();
176170408Ssimokawa        checkJqueryAndImageFiles(true);
177170408Ssimokawa        checkFiles(true,
178121468Ssimokawa                "member-search-index.zip",
179121468Ssimokawa                "package-search-index.zip",
180121468Ssimokawa                "tag-search-index.zip",
181121468Ssimokawa                "type-search-index.zip");
182186876Smarius    }
183121468Ssimokawa
184186876Smarius    @Test
185186876Smarius    void test9() {
186121468Ssimokawa        javadoc("-d", "out-9", "-sourcepath", testSrc, "-javafx", "-package",
187121468Ssimokawa                "-use", "pkgfx", "pkg3");
188121468Ssimokawa        checkExit(Exit.OK);
189121468Ssimokawa        checkSearchOutput(true);
190121468Ssimokawa        checkJavaFXOutput();
191121468Ssimokawa        checkJqueryAndImageFiles(true);
192121468Ssimokawa        checkFiles(false,
193186876Smarius                "tag-search-index.zip");
194121468Ssimokawa        checkFiles(true,
195121468Ssimokawa                "member-search-index.zip",
196121468Ssimokawa                "package-search-index.zip",
197121468Ssimokawa                "type-search-index.zip");
198121468Ssimokawa    }
199121468Ssimokawa
200125862Ssimokawa    void checkDocLintErrors() {
201121468Ssimokawa        checkOutput(Output.OUT, true,
202121468Ssimokawa                "A sample method. Testing search tag for {@index \"unclosed quote}.",
203121468Ssimokawa                "Another test class. Testing empty {@index }.",
204121468Ssimokawa                "Constant field. Testing no text in index tag {@index}.",
205121468Ssimokawa                "A test field. Testing only white-spaces in index tag text {@index       }.");
206121468Ssimokawa    }
207186876Smarius
208186876Smarius    void checkSearchOutput(boolean expectedOutput) {
209186876Smarius        checkSearchOutput("overview-summary.html", expectedOutput);
210186876Smarius    }
211186876Smarius
212186876Smarius    void checkSearchOutput(String fileName, boolean expectedOutput) {
213125862Ssimokawa        // Test for search related markup
214122310Ssimokawa        checkOutput(fileName, expectedOutput,
215186876Smarius                "<link rel=\"stylesheet\" type=\"text/css\" href=\"jquery/jquery-ui.css\" title=\"Style\">\n",
216186876Smarius                "<script type=\"text/javascript\" src=\"jquery/jszip/dist/jszip.min.js\"></script>\n",
217170408Ssimokawa                "<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils.min.js\"></script>\n",
218170408Ssimokawa                "<!--[if IE]>\n",
219121468Ssimokawa                "<script type=\"text/javascript\" src=\"jquery/jszip-utils/dist/jszip-utils-ie.min.js\"></script>\n",
220121468Ssimokawa                "<![endif]-->\n",
221121468Ssimokawa                "<script type=\"text/javascript\" src=\"jquery/jquery-1.10.2.js\"></script>\n",
222121468Ssimokawa                "<script type=\"text/javascript\" src=\"jquery/jquery-ui.js\"></script>",
223121468Ssimokawa                "var pathtoroot = \"./\";loadScripts(document, 'script');",
224121468Ssimokawa                "<ul class=\"navListSearch\">\n",
225121468Ssimokawa                "<li><span>SEARCH:&nbsp;</span>\n",
226121468Ssimokawa                "<input type=\"text\" id=\"search\" value=\" \" disabled=\"disabled\">\n",
227121468Ssimokawa                "<input type=\"reset\" id=\"reset\" value=\" \" disabled=\"disabled\">\n");
228121468Ssimokawa        checkOutput(fileName, true,
229121468Ssimokawa                "<div class=\"fixedNav\">");
230170408Ssimokawa    }
231170408Ssimokawa
232170408Ssimokawa    void checkSingleIndex(boolean expectedOutput) {
233121468Ssimokawa        // Test for search tags markup in index file.
234125862Ssimokawa        checkOutput("index-all.html", expectedOutput,
235125862Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
236121468Ssimokawa                        + "phrase with spaces</a></span> - Search tag in pkg</dt>",
237121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
238121468Ssimokawa                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
239121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
240121468Ssimokawa                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
241121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
242121468Ssimokawa                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
243121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
244121468Ssimokawa                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
245121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
246121468Ssimokawa                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
247121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
248121468Ssimokawa                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
249121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
250121468Ssimokawa                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
251121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
252121468Ssimokawa                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
253121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
254121468Ssimokawa                        + "SingleWord</a></span> - Search tag in pkg</dt>",
255121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html"
256121468Ssimokawa                        + "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
257121468Ssimokawa                        + "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>",
258121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.ModalExclusionType.html"
259121468Ssimokawa                        + "#html-span-see-/span-\">html &lt;span&gt; see &lt;/span&gt;</a></span> - Search "
260121468Ssimokawa                        + "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>",
261121468Ssimokawa                "<dt><span class=\"searchTagLink\"><a href=\"pkg/AnotherClass.html#quoted\">quoted</a>"
262121468Ssimokawa                        + "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>");
263121468Ssimokawa        checkOutput("index-all.html", true,
264121468Ssimokawa                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
265121468Ssimokawa                        + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
266121468Ssimokawa                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
267                        + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
268    }
269
270    void checkSplitIndex() {
271        // Test for search tags markup in split index file.
272        checkOutput("index-files/index-12.html", true,
273                "<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#searchphrase\">"
274                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
275                "<dt><span class=\"searchTagLink\"><a href=\"../pkg1/RegClass.html#SearchWordWithDescription\">"
276                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
277                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
278                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
279                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestClass.html#SearchTagDeprecatedClass\">"
280                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
281                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
282                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
283                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestEnum.html#searchphrasedeprecated\">"
284                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
285                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
286                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
287                "<dt><span class=\"searchTagLink\"><a href=\"../pkg2/TestError.html#SearchTagDeprecatedMethod\">"
288                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
289                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#SingleWord\">"
290                        + "SingleWord</a></span> - Search tag in pkg</dt>");
291        checkOutput("index-files/index-9.html", true,
292                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/package-summary.html#phrasewithspaces\">"
293                        + "phrase with spaces</a></span> - Search tag in pkg</dt>");
294        checkOutput("index-files/index-8.html", true,
295                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
296                        + "#nested%7B@indexnested_tag_test%7D\">nested {@index nested_tag_test}</a></span> - "
297                        + "Search tag in pkg.AnotherClass.ModalExclusionType.NO_EXCLUDE</dt>");
298        checkOutput("index-files/index-5.html", true,
299                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.ModalExclusionType.html"
300                        + "#html-span-see-/span-\">html &lt;span&gt; see &lt;/span&gt;</a></span> - Search "
301                        + "tag in pkg.AnotherClass.ModalExclusionType.APPLICATION_EXCLUDE</dt>");
302        checkOutput("index-files/index-10.html", true,
303                "<dt><span class=\"searchTagLink\"><a href=\"../pkg/AnotherClass.html#quoted\">quoted</a>"
304                        + "</span> - Search tag in pkg.AnotherClass.CONSTANT1</dt>");
305    }
306
307    void checkIndexNoComment() {
308        // Test for search tags markup in index file when javadoc is executed with -nocomment.
309        checkOutput("index-all.html", false,
310                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
311                        + "phrase with spaces</a></span> - Search tag in pkg</dt>",
312                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
313                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
314                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
315                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
316                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
317                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
318                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
319                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
320                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
321                        + "SingleWord</a></span> - Search tag in pkg</dt>",
322                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
323                        + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
324                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
325                        + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
326        checkOutput("index-all.html", true,
327                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
328                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
329                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
330                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>");
331    }
332
333    void checkIndexNoDeprecated() {
334        // Test for search tags markup in index file when javadoc is executed using -nodeprecated.
335        checkOutput("index-all.html", true,
336                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#phrasewithspaces\">"
337                        + "phrase with spaces</a></span> - Search tag in pkg</dt>",
338                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#searchphrase\">"
339                        + "search phrase</a></span> - Search tag in pkg1.RegClass</dt>",
340                "<dt><span class=\"searchTagLink\"><a href=\"pkg1/RegClass.html#SearchWordWithDescription\">"
341                        + "SearchWordWithDescription</a></span> - Search tag in pkg1.RegClass.CONSTANT_FIELD_1</dt>",
342                "<dt><span class=\"searchTagLink\"><a href=\"pkg/package-summary.html#SingleWord\">"
343                        + "SingleWord</a></span> - Search tag in pkg</dt>");
344        checkOutput("index-all.html", false,
345                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestAnnotationType.html#searchphrasewithdescdeprecated\">"
346                        + "search phrase with desc deprecated</a></span> - Search tag in pkg2.TestAnnotationType</dt>",
347                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestClass.html#SearchTagDeprecatedClass\">"
348                        + "SearchTagDeprecatedClass</a></span> - Search tag in pkg2.TestClass</dt>",
349                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestEnum.html#searchphrasedeprecated\">"
350                        + "search phrase deprecated</a></span> - Search tag in pkg2.TestEnum.ONE</dt>",
351                "<dt><span class=\"searchTagLink\"><a href=\"pkg2/TestError.html#SearchTagDeprecatedMethod\">"
352                        + "SearchTagDeprecatedMethod</a></span> - Search tag in pkg2.TestError</dt>",
353                "<div class=\"block\"><span class=\"deprecationComment\">class_test1 passes. Search tag"
354                        + " <a id=\"SearchTagDeprecatedClass\">SearchTagDeprecatedClass</a></span></div>",
355                "<div class=\"block\"><span class=\"deprecationComment\">error_test3 passes. Search tag for\n"
356                        + " method <a id=\"SearchTagDeprecatedMethod\">SearchTagDeprecatedMethod</a></span></div>");
357    }
358
359    void checkJavaFXOutput() {
360        checkOutput("index-all.html", false, "test treat as private");
361    }
362
363    void checkInvalidUsageIndexTag() {
364        checkOutput(Output.OUT, true,
365                "AnotherClass.java:29: warning - invalid usage of tag {@index",
366                "AnotherClass.java:41: warning - invalid usage of tag {@index",
367                "AnotherClass.java:36: warning - invalid usage of tag {@index",
368                "AnotherClass.java:70: warning - invalid usage of tag {@index");
369    }
370
371    void checkJqueryAndImageFiles(boolean expectedOutput) {
372        checkFiles(expectedOutput,
373                "search.js",
374                "jquery/jquery-1.10.2.js",
375                "jquery/jquery-ui.js",
376                "jquery/jquery-ui.css",
377                "jquery/jquery-ui.min.js",
378                "jquery/jquery-ui.min.css",
379                "jquery/jquery-ui.structure.min.css",
380                "jquery/jquery-ui.structure.css",
381                "jquery/external/jquery/jquery.js",
382                "jquery/jszip/dist/jszip.js",
383                "jquery/jszip/dist/jszip.min.js",
384                "jquery/jszip-utils/dist/jszip-utils.js",
385                "jquery/jszip-utils/dist/jszip-utils.min.js",
386                "jquery/jszip-utils/dist/jszip-utils-ie.js",
387                "jquery/jszip-utils/dist/jszip-utils-ie.min.js",
388                "jquery/images/ui-bg_flat_0_aaaaaa_40x100.png",
389                "jquery/images/ui-icons_454545_256x240.png",
390                "jquery/images/ui-bg_glass_95_fef1ec_1x400.png",
391                "jquery/images/ui-bg_glass_75_dadada_1x400.png",
392                "jquery/images/ui-bg_highlight-soft_75_cccccc_1x100.png",
393                "jquery/images/ui-icons_888888_256x240.png",
394                "jquery/images/ui-icons_2e83ff_256x240.png",
395                "jquery/images/ui-bg_glass_65_ffffff_1x400.png",
396                "jquery/images/ui-icons_cd0a0a_256x240.png",
397                "jquery/images/ui-bg_glass_55_fbf9ee_1x400.png",
398                "jquery/images/ui-icons_222222_256x240.png",
399                "jquery/images/ui-bg_glass_75_e6e6e6_1x400.png",
400                "jquery/images/ui-bg_flat_75_ffffff_40x100.png",
401                "resources/x.png",
402                "resources/glass.png");
403    }
404}
405