author | jjg |
Tue, 22 Apr 2014 17:57:40 -0700 | |
changeset 24072 | e7549dcbc4af |
parent 24065 | fc4022e50129 |
child 24217 | 25b12d4d4192 |
permissions | -rw-r--r-- |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
1 |
/* |
23971 | 2 |
* Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
4 |
* |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
5520 | 7 |
* published by the Free Software Foundation. Oracle designates this |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
8 |
* particular file as subject to the "Classpath" exception as provided |
5520 | 9 |
* by Oracle in the LICENSE file that accompanied this code. |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
10 |
* |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
15 |
* accompanied this code). |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
16 |
* |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
20 |
* |
5520 | 21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
24 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
25 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
26 |
/* |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
27 |
* @test |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
28 |
* @bug 6786690 6820360 8025633 8026567 |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
29 |
* @summary This test verifies the nesting of definition list tags. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
30 |
* @author Bhavesh Patel |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
31 |
* @library ../lib/ |
9083
63f3c4d2d992
7010344: Some of the html files do not have element <a> in right context.
bpatel
parents:
7681
diff
changeset
|
32 |
* @build JavadocTester TestHtmlDefinitionListTag |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
33 |
* @run main TestHtmlDefinitionListTag |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
34 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
35 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
36 |
public class TestHtmlDefinitionListTag extends JavadocTester { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
37 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
38 |
// Test common to all runs of javadoc. The class signature should print |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
39 |
// properly enclosed definition list tags and the Annotation Type |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
40 |
// Optional Element should print properly nested definition list tags |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
41 |
// for default value. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
42 |
private static final String[][] TEST_ALL = { |
24072 | 43 |
{ "pkg1/C1.html", "<pre>public class " + |
23971 | 44 |
"<span class=\"typeNameLabel\">C1</span>\n" + |
45 |
"extends java.lang.Object\n" + |
|
46 |
"implements java.io.Serializable</pre>"}, |
|
24072 | 47 |
{ "pkg1/C4.html", "<dl>\n" + |
23971 | 48 |
"<dt>Default:</dt>\n" + |
49 |
"<dd>true</dd>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
50 |
"</dl>"}}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
51 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
52 |
// Test for normal run of javadoc in which various ClassDocs and |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
53 |
// serialized form should have properly nested definition list tags |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
54 |
// enclosing comments, tags and deprecated information. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
55 |
private static final String[][] TEST_CMNT_DEPR = { |
24072 | 56 |
{ "pkg1/package-summary.html", "<dl>\n" + |
23971 | 57 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
58 |
"<dd>JDK1.0</dd>\n" + |
|
59 |
"</dl>"}, |
|
24072 | 60 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 61 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
62 |
"<dd>JDK1.0</dd>\n" + |
|
63 |
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
64 |
"<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>" + |
23971 | 65 |
"C2</code></a>, \n" + |
66 |
"<a href=\"../serialized-form.html#pkg1.C1\">" + |
|
67 |
"Serialized Form</a></dd>\n" + |
|
68 |
"</dl>"}, |
|
24072 | 69 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 70 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
71 |
"<dd>1.4</dd>\n" + |
|
72 |
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
73 |
"<dd>" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
74 |
"<a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 75 |
"<code>setUndecorated(boolean)</code></a></dd>\n" + |
76 |
"</dl>"}, |
|
24072 | 77 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 78 |
"<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" + |
79 |
"<dd><code>title" + |
|
80 |
"</code> - the title</dd>\n" + |
|
81 |
"<dd><code>test</code> - boolean value" + |
|
82 |
"</dd>\n" + |
|
83 |
"<dt><span class=\"throwsLabel\">Throws:</span></dt>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
84 |
"<dd><code>java.lang.IllegalArgumentException</code> - if the " + |
23971 | 85 |
"<code>owner</code>'s\n" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
86 |
" <code>GraphicsConfiguration</code> is not from a screen " + |
23971 | 87 |
"device</dd>\n" + |
88 |
"<dd><code>HeadlessException</code></dd>\n" + |
|
89 |
"</dl>"}, |
|
24072 | 90 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 91 |
"<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" + |
92 |
"<dd><code>undecorated" + |
|
93 |
"</code> - <code>true</code> if no decorations are\n" + |
|
94 |
" to be enabled;\n" + |
|
95 |
" <code>false</code> " + |
|
96 |
"if decorations are to be enabled.</dd>\n" + |
|
97 |
"<dt><span class=\"simpleTagLabel\">Since:" + |
|
98 |
"</span></dt>\n" + |
|
99 |
"<dd>1.4</dd>\n" + |
|
100 |
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
101 |
"<dd>" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
102 |
"<a href=\"../pkg1/C1.html#readObject--\"><code>readObject()" + |
23971 | 103 |
"</code></a></dd>\n" + |
104 |
"</dl>"}, |
|
24072 | 105 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 106 |
"<dt><span class=\"throwsLabel\">Throws:</span></dt>\n" + |
107 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
108 |
"<dt><span class=\"seeLabel\">See Also:" + |
|
109 |
"</span></dt>\n" + |
|
110 |
"<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + |
|
111 |
"<code>setUndecorated(boolean)</code></a></dd>\n" + |
|
112 |
"</dl>"}, |
|
24072 | 113 |
{ "pkg1/C2.html", "<dl>\n" + |
23971 | 114 |
"<dt><span class=\"paramLabel\">Parameters:" + |
115 |
"</span></dt>\n" + |
|
116 |
"<dd><code>set</code> - boolean</dd>\n" + |
|
117 |
"<dt><span class=\"simpleTagLabel\">" + |
|
118 |
"Since:</span></dt>\n" + |
|
119 |
"<dd>1.4</dd>\n" + |
|
120 |
"</dl>"}, |
|
24072 | 121 |
{ "serialized-form.html", "<dl>\n" + |
23971 | 122 |
"<dt><span class=\"throwsLabel\">Throws:</span>" + |
123 |
"</dt>\n" + |
|
124 |
"<dd><code>" + |
|
125 |
"java.io.IOException</code></dd>\n" + |
|
126 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
127 |
"</dt>\n" + |
|
128 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
129 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
130 |
"</dl>"}, |
|
24072 | 131 |
{ "serialized-form.html", |
23971 | 132 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
133 |
" <span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
134 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 135 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
136 |
"<div class=\"block\">This field indicates whether the C1 is " + |
23971 | 137 |
"undecorated.</div>\n" + |
138 |
" \n" + |
|
139 |
"<dl>\n" + |
|
140 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
141 |
"<dd>1.4</dd>\n" + |
|
142 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
143 |
"</dt>\n" + |
|
144 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
145 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
146 |
"</dl>"}, |
|
24072 | 147 |
{ "serialized-form.html", |
23971 | 148 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
149 |
" <span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
150 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 151 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
152 |
"<div class=\"block\">Reads the object stream.</div>\n" + |
|
153 |
"<dl>\n" + |
|
154 |
"<dt><span class=\"throwsLabel\">Throws:" + |
|
155 |
"</span></dt>\n" + |
|
156 |
"<dd><code><code>" + |
|
157 |
"IOException</code></code></dd>\n" + |
|
158 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
159 |
"</dl>"}, |
|
24072 | 160 |
{ "serialized-form.html", |
23971 | 161 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
162 |
" </div>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
163 |
"<div class=\"block\">The name for this class.</div>"}}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
164 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
165 |
// Test with -nodeprecated option. The ClassDocs should have properly nested |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
166 |
// definition list tags enclosing comments and tags. The ClassDocs should not |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
167 |
// display definition list for deprecated information. The serialized form |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
168 |
// should display properly nested definition list tags for comments, tags |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
169 |
// and deprecated information. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
170 |
private static final String[][] TEST_NODEPR = { |
24072 | 171 |
{ "pkg1/package-summary.html", "<dl>\n" + |
23971 | 172 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
173 |
"<dd>JDK1.0</dd>\n" + |
|
174 |
"</dl>"}, |
|
24072 | 175 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 176 |
"<dt><span class=\"simpleTagLabel\">Since:</span>" + |
177 |
"</dt>\n" + |
|
178 |
"<dd>JDK1.0</dd>\n" + |
|
179 |
"<dt><span class=\"seeLabel\">See Also:" + |
|
180 |
"</span></dt>\n" + |
|
181 |
"<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" + |
|
182 |
"<code>C2</code></a>, \n" + |
|
183 |
"<a href=\"../serialized-form.html#pkg1.C1\">" + |
|
184 |
"Serialized Form</a></dd>\n" + |
|
185 |
"</dl>"}, |
|
24072 | 186 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 187 |
"<dt><span class=\"paramLabel\">Parameters:" + |
188 |
"</span></dt>\n" + |
|
189 |
"<dd><code>title</code> - the title</dd>\n" + |
|
190 |
"<dd><code>" + |
|
191 |
"test</code> - boolean value</dd>\n" + |
|
192 |
"<dt><span class=\"throwsLabel\">Throws:" + |
|
193 |
"</span></dt>\n" + |
|
194 |
"<dd><code>java.lang.IllegalArgumentException" + |
|
195 |
"</code> - if the <code>owner</code>'s\n" + |
|
196 |
" <code>GraphicsConfiguration" + |
|
197 |
"</code> is not from a screen device</dd>\n" + |
|
198 |
"<dd><code>" + |
|
199 |
"HeadlessException</code></dd>\n" + |
|
200 |
"</dl>"}, |
|
24072 | 201 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 202 |
"<dt><span class=\"paramLabel\">Parameters:" + |
203 |
"</span></dt>\n" + |
|
204 |
"<dd><code>undecorated</code> - <code>true</code>" + |
|
205 |
" if no decorations are\n" + |
|
206 |
" to be enabled;\n" + |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
207 |
" <code>false</code> if decorations are to be enabled." + |
23971 | 208 |
"</dd>\n" + |
209 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
210 |
"<dd>1.4</dd>\n" + |
|
211 |
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
212 |
"<dd><a href=\"../pkg1/C1.html#readObject--\">" + |
|
213 |
"<code>readObject()</code></a></dd>\n" + |
|
214 |
"</dl>"}, |
|
24072 | 215 |
{ "pkg1/C1.html", "<dl>\n" + |
23971 | 216 |
"<dt><span class=\"throwsLabel\">Throws:</span>" + |
217 |
"</dt>\n" + |
|
218 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
219 |
"<dt>" + |
|
220 |
"<span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
221 |
"<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + |
|
222 |
"<code>setUndecorated(boolean)</code></a></dd>\n" + |
|
223 |
"</dl>"}, |
|
24072 | 224 |
{ "serialized-form.html", "<dl>\n" + |
23971 | 225 |
"<dt><span class=\"throwsLabel\">Throws:</span>" + |
226 |
"</dt>\n" + |
|
227 |
"<dd><code>" + |
|
228 |
"java.io.IOException</code></dd>\n" + |
|
229 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
230 |
"</dt>\n" + |
|
231 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
232 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
233 |
"</dl>"}, |
|
24072 | 234 |
{ "serialized-form.html", |
23971 | 235 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
236 |
" <span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
237 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 238 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
239 |
"<div class=\"block\">This field indicates whether the C1 is " + |
23971 | 240 |
"undecorated.</div>\n" + |
241 |
" \n" + |
|
242 |
"<dl>\n" + |
|
243 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
244 |
"<dd>1.4</dd>\n" + |
|
245 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
246 |
"</dt>\n" + |
|
247 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
248 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
249 |
"</dl>"}, |
|
24072 | 250 |
{ "serialized-form.html", |
23971 | 251 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
252 |
" <span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
253 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 254 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
255 |
"<div class=\"block\">Reads the object stream.</div>\n" + |
|
256 |
"<dl>\n" + |
|
257 |
"<dt><span class=\"throwsLabel\">Throws:" + |
|
258 |
"</span></dt>\n" + |
|
259 |
"<dd><code><code>" + |
|
260 |
"IOException</code></code></dd>\n" + |
|
261 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
262 |
"</dl>"}, |
|
24072 | 263 |
{ "serialized-form.html", |
23971 | 264 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
265 |
" </div>\n" + |
|
266 |
"<div class=\"block\">" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
267 |
"The name for this class.</div>"}}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
268 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
269 |
// Test with -nocomment and -nodeprecated options. The ClassDocs whould |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
270 |
// not display definition lists for any member details. |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
271 |
private static final String[][] TEST_NOCMNT_NODEPR = { |
24072 | 272 |
{ "pkg1/C1.html", |
23971 | 273 |
"<pre>public void readObject()\n" + |
274 |
" throws java.io.IOException</pre>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
275 |
"</li>"}, |
24072 | 276 |
{ "pkg1/C2.html", "<pre>public C2()</pre>\n" + |
23971 | 277 |
"</li>"}, |
24072 | 278 |
{ "pkg1/C1.ModalExclusionType.html", "<pre>public " + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
279 |
"static final <a href=\"../pkg1/C1.ModalExclusionType.html\" " + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
280 |
"title=\"enum in pkg1\">C1.ModalExclusionType</a> " + |
23971 | 281 |
"APPLICATION_EXCLUDE</pre>\n" + |
282 |
"</li>"}, |
|
24072 | 283 |
{ "serialized-form.html", "<pre>boolean " + |
23971 | 284 |
"undecorated</pre>\n" + |
285 |
"<div class=\"block\"><span class=\"deprecatedLabel\">" + |
|
286 |
"Deprecated.</span> <span class=\"deprecationComment\">As of JDK version 1.5, replaced by\n" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
287 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" + |
23971 | 288 |
"setUndecorated(boolean)</code></a>.</span></div>\n" + |
289 |
"</li>"}, |
|
24072 | 290 |
{ "serialized-form.html", "<span class=\"deprecatedLabel\">" + |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
291 |
"Deprecated.</span> <span class=\"deprecationComment\">As of JDK version" + |
23971 | 292 |
" 1.5, replaced by\n" + |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
293 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 294 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
295 |
"</li>"}}; |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
296 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
297 |
// Test for valid HTML generation which should not comprise of empty |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
298 |
// definition list tags. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
299 |
private static final String[][] NEGATED_TEST = { |
24072 | 300 |
{ "pkg1/package-summary.html", "<dl></dl>"}, |
301 |
{ "pkg1/package-summary.html", "<dl>\n" + |
|
23971 | 302 |
"</dl>"}, |
24072 | 303 |
{ "pkg1/C1.html", "<dl></dl>"}, |
304 |
{ "pkg1/C1.html", "<dl>\n" + |
|
23971 | 305 |
"</dl>"}, |
24072 | 306 |
{ "pkg1/C1.ModalExclusionType.html", "<dl></dl>"}, |
307 |
{ "pkg1/C1.ModalExclusionType.html", "<dl>\n" + |
|
23971 | 308 |
"</dl>"}, |
24072 | 309 |
{ "pkg1/C2.html", "<dl></dl>"}, |
310 |
{ "pkg1/C2.html", "<dl>\n" + |
|
23971 | 311 |
"</dl>"}, |
24072 | 312 |
{ "pkg1/C2.ModalType.html", "<dl></dl>"}, |
313 |
{ "pkg1/C2.ModalType.html", "<dl>\n" + |
|
23971 | 314 |
"</dl>"}, |
24072 | 315 |
{ "pkg1/C3.html", "<dl></dl>"}, |
316 |
{ "pkg1/C3.html", "<dl>\n" + |
|
23971 | 317 |
"</dl>"}, |
24072 | 318 |
{ "pkg1/C4.html", "<dl></dl>"}, |
319 |
{ "pkg1/C4.html", "<dl>\n" + |
|
23971 | 320 |
"</dl>"}, |
24072 | 321 |
{ "pkg1/C5.html", "<dl></dl>"}, |
322 |
{ "pkg1/C5.html", "<dl>\n" + |
|
23971 | 323 |
"</dl>"}, |
24072 | 324 |
{ "overview-tree.html", "<dl></dl>"}, |
325 |
{ "overview-tree.html", "<dl>\n" + |
|
23971 | 326 |
"</dl>"}, |
24072 | 327 |
{ "serialized-form.html", "<dl></dl>"}, |
328 |
{ "serialized-form.html", "<dl>\n" + |
|
23971 | 329 |
"</dl>"}}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
330 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
331 |
private static final String[] ARGS1 = |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
332 |
new String[] { |
24072 | 333 |
"-Xdoclint:none", "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1"}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
334 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
335 |
private static final String[] ARGS2 = |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
336 |
new String[] { |
24072 | 337 |
"-Xdoclint:none", "-d", OUTPUT_DIR, "-nocomment", "-sourcepath", |
23971 | 338 |
SRC_DIR, "pkg1"}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
339 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
340 |
private static final String[] ARGS3 = |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
341 |
new String[] { |
24072 | 342 |
"-Xdoclint:none", "-d", OUTPUT_DIR, "-nodeprecated", "-sourcepath", |
23971 | 343 |
SRC_DIR, "pkg1"}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
344 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
345 |
private static final String[] ARGS4 = |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
346 |
new String[] { |
24072 | 347 |
"-Xdoclint:none", "-d", OUTPUT_DIR, "-nocomment", "-nodeprecated", |
23971 | 348 |
"-sourcepath", SRC_DIR, "pkg1"}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
349 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
350 |
/** |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
351 |
* The entry point of the test. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
352 |
* @param args the array of command line arguments. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
353 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
354 |
public static void main(String[] args) { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
355 |
TestHtmlDefinitionListTag tester = new TestHtmlDefinitionListTag(); |
24065
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
356 |
tester.run(ARGS1, TEST_ALL, NEGATED_TEST); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
357 |
tester.run(ARGS1, TEST_CMNT_DEPR, NEGATED_TEST); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
358 |
tester.run(ARGS2, TEST_ALL, NEGATED_TEST); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
359 |
tester.run(ARGS2, NO_TEST, TEST_CMNT_DEPR); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
360 |
tester.run(ARGS3, TEST_ALL, NEGATED_TEST); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
361 |
tester.run(ARGS3, TEST_NODEPR, TEST_NOCMNT_NODEPR); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
362 |
tester.run(ARGS4, TEST_ALL, NEGATED_TEST); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
363 |
tester.run(ARGS4, TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR); |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
364 |
tester.printSummary(); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
365 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
366 |
} |