author | ohair |
Tue, 25 May 2010 15:54:51 -0700 | |
changeset 5520 | 86e4b9a9da40 |
parent 2985 | f43e1241e7fb |
child 7614 | cfadc977ca75 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
5520 | 2 |
* Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. |
10 | 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 |
* |
|
5520 | 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. |
|
10 | 22 |
*/ |
23 |
||
24 |
/* |
|
25 |
* @test |
|
26 |
* @bug 4852280 4517115 4973608 4994589 |
|
27 |
* @summary Perform tests on index.html file. |
|
28 |
* Also test that index-all.html has the appropriate output. |
|
29 |
* Test for unnamed package in index. |
|
30 |
* @author jamieh |
|
31 |
* @library ../lib/ |
|
32 |
* @build JavadocTester |
|
33 |
* @build TestIndex |
|
34 |
* @run main TestIndex |
|
35 |
*/ |
|
36 |
||
37 |
public class TestIndex extends JavadocTester { |
|
38 |
||
39 |
//Test information. |
|
40 |
private static final String BUG_ID = "4852280-4517115-4973608-4994589"; |
|
41 |
||
42 |
//Javadoc arguments. |
|
43 |
private static final String[] ARGS = new String[] { |
|
2985
f43e1241e7fb
6843761: Update langtools tests to remove unncessary -source and -target options
darcy
parents:
2216
diff
changeset
|
44 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg", SRC_DIR + FS + "NoPackage.java" |
10 | 45 |
}; |
46 |
||
47 |
//Input for string search tests. |
|
48 |
private static final String[][] TEST = { |
|
49 |
//Make sure the horizontal scroll bar does not appear in class frame. |
|
50 |
{BUG_ID + FS + "index.html", |
|
51 |
"<FRAME src=\"overview-summary.html\" name=\"classFrame\" " + |
|
52 |
"title=\"Package, class and interface descriptions\" " + |
|
53 |
"scrolling=\"yes\">"}, |
|
54 |
||
55 |
//Test index-all.html |
|
56 |
{BUG_ID + FS + "index-all.html", |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
57 |
"<A HREF=\"./pkg/C.html\" title=\"class in pkg\"><STRONG>C</STRONG></A>" + |
10 | 58 |
" - Class in <A HREF=\"./pkg/package-summary.html\">pkg</A>"}, |
59 |
{BUG_ID + FS + "index-all.html", |
|
60 |
"<A HREF=\"./pkg/Interface.html\" title=\"interface in pkg\">" + |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
61 |
"<STRONG>Interface</STRONG></A> - Interface in " + |
10 | 62 |
"<A HREF=\"./pkg/package-summary.html\">pkg</A>"}, |
63 |
{BUG_ID + FS + "index-all.html", |
|
64 |
"<A HREF=\"./pkg/AnnotationType.html\" title=\"annotation in pkg\">" + |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
65 |
"<STRONG>AnnotationType</STRONG></A> - Annotation Type in " + |
10 | 66 |
"<A HREF=\"./pkg/package-summary.html\">pkg</A>"}, |
67 |
{BUG_ID + FS + "index-all.html", |
|
68 |
"<A HREF=\"./pkg/Coin.html\" title=\"enum in pkg\">" + |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
69 |
"<STRONG>Coin</STRONG></A> - Enum in " + |
10 | 70 |
"<A HREF=\"./pkg/package-summary.html\">pkg</A>"}, |
71 |
{BUG_ID + FS + "index-all.html", |
|
72 |
"Class in <A HREF=\"./package-summary.html\"><Unnamed></A>"}, |
|
73 |
{BUG_ID + FS + "index-all.html", |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
74 |
"<DT><A HREF=\"./pkg/C.html#Java\"><STRONG>Java</STRONG></A> - " + NL + |
10 | 75 |
"Static variable in class pkg.<A HREF=\"./pkg/C.html\" title=\"class in pkg\">C</A>" + NL + |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
76 |
"</DT><DD> </DD>" + NL + NL + |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
10
diff
changeset
|
77 |
"<DT><A HREF=\"./pkg/C.html#JDK\"><STRONG>JDK</STRONG></A> - " + NL + |
10 | 78 |
"Static variable in class pkg.<A HREF=\"./pkg/C.html\" title=\"class in pkg\">C</A>" + NL + |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
1787
diff
changeset
|
79 |
"</DT><DD> </DD>"}, |
10 | 80 |
}; |
81 |
private static final String[][] NEGATED_TEST = NO_TEST; |
|
82 |
||
83 |
/** |
|
84 |
* The entry point of the test. |
|
85 |
* @param args the array of command line arguments. |
|
86 |
*/ |
|
87 |
public static void main(String[] args) { |
|
88 |
TestIndex tester = new TestIndex(); |
|
89 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
90 |
tester.printSummary(); |
|
91 |
} |
|
92 |
||
93 |
/** |
|
94 |
* {@inheritDoc} |
|
95 |
*/ |
|
96 |
public String getBugId() { |
|
97 |
return BUG_ID; |
|
98 |
} |
|
99 |
||
100 |
/** |
|
101 |
* {@inheritDoc} |
|
102 |
*/ |
|
103 |
public String getBugName() { |
|
104 |
return getClass().getName(); |
|
105 |
} |
|
106 |
} |