author | jjg |
Wed, 16 Apr 2014 16:17:09 -0700 | |
changeset 23971 | f5ff1f5a8dee |
parent 21478 | fa4c7cda1b41 |
child 24065 | fc4022e50129 |
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 |
|
2321
57fc341671c4
6820360: Fix for definition list tags nesting adds an extra list tag for package summary page.
bpatel
parents:
2216
diff
changeset
|
38 |
private static final String BUG_ID = "6786690-6820360"; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
39 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
40 |
// 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
|
41 |
// 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
|
42 |
// 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
|
43 |
// for default value. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
44 |
private static final String[][] TEST_ALL = { |
23971 | 45 |
{BUG_ID + "/pkg1/C1.html", "<pre>public class " + |
46 |
"<span class=\"typeNameLabel\">C1</span>\n" + |
|
47 |
"extends java.lang.Object\n" + |
|
48 |
"implements java.io.Serializable</pre>"}, |
|
49 |
{BUG_ID + "/pkg1/C4.html", "<dl>\n" + |
|
50 |
"<dt>Default:</dt>\n" + |
|
51 |
"<dd>true</dd>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
52 |
"</dl>"}}; |
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
53 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
54 |
// 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
|
55 |
// 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
|
56 |
// 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
|
57 |
private static final String[][] TEST_CMNT_DEPR = { |
23971 | 58 |
{BUG_ID + "/pkg1/package-summary.html", "<dl>\n" + |
59 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
60 |
"<dd>JDK1.0</dd>\n" + |
|
61 |
"</dl>"}, |
|
62 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
63 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
64 |
"<dd>JDK1.0</dd>\n" + |
|
65 |
"<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
|
66 |
"<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>" + |
23971 | 67 |
"C2</code></a>, \n" + |
68 |
"<a href=\"../serialized-form.html#pkg1.C1\">" + |
|
69 |
"Serialized Form</a></dd>\n" + |
|
70 |
"</dl>"}, |
|
71 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
72 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
73 |
"<dd>1.4</dd>\n" + |
|
74 |
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
75 |
"<dd>" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
76 |
"<a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 77 |
"<code>setUndecorated(boolean)</code></a></dd>\n" + |
78 |
"</dl>"}, |
|
79 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
80 |
"<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" + |
|
81 |
"<dd><code>title" + |
|
82 |
"</code> - the title</dd>\n" + |
|
83 |
"<dd><code>test</code> - boolean value" + |
|
84 |
"</dd>\n" + |
|
85 |
"<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
|
86 |
"<dd><code>java.lang.IllegalArgumentException</code> - if the " + |
23971 | 87 |
"<code>owner</code>'s\n" + |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
88 |
" <code>GraphicsConfiguration</code> is not from a screen " + |
23971 | 89 |
"device</dd>\n" + |
90 |
"<dd><code>HeadlessException</code></dd>\n" + |
|
91 |
"</dl>"}, |
|
92 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
93 |
"<dt><span class=\"paramLabel\">Parameters:</span></dt>\n" + |
|
94 |
"<dd><code>undecorated" + |
|
95 |
"</code> - <code>true</code> if no decorations are\n" + |
|
96 |
" to be enabled;\n" + |
|
97 |
" <code>false</code> " + |
|
98 |
"if decorations are to be enabled.</dd>\n" + |
|
99 |
"<dt><span class=\"simpleTagLabel\">Since:" + |
|
100 |
"</span></dt>\n" + |
|
101 |
"<dd>1.4</dd>\n" + |
|
102 |
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
103 |
"<dd>" + |
|
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
104 |
"<a href=\"../pkg1/C1.html#readObject--\"><code>readObject()" + |
23971 | 105 |
"</code></a></dd>\n" + |
106 |
"</dl>"}, |
|
107 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
108 |
"<dt><span class=\"throwsLabel\">Throws:</span></dt>\n" + |
|
109 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
110 |
"<dt><span class=\"seeLabel\">See Also:" + |
|
111 |
"</span></dt>\n" + |
|
112 |
"<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + |
|
113 |
"<code>setUndecorated(boolean)</code></a></dd>\n" + |
|
114 |
"</dl>"}, |
|
115 |
{BUG_ID + "/pkg1/C2.html", "<dl>\n" + |
|
116 |
"<dt><span class=\"paramLabel\">Parameters:" + |
|
117 |
"</span></dt>\n" + |
|
118 |
"<dd><code>set</code> - boolean</dd>\n" + |
|
119 |
"<dt><span class=\"simpleTagLabel\">" + |
|
120 |
"Since:</span></dt>\n" + |
|
121 |
"<dd>1.4</dd>\n" + |
|
122 |
"</dl>"}, |
|
123 |
{BUG_ID + "/serialized-form.html", "<dl>\n" + |
|
124 |
"<dt><span class=\"throwsLabel\">Throws:</span>" + |
|
125 |
"</dt>\n" + |
|
126 |
"<dd><code>" + |
|
127 |
"java.io.IOException</code></dd>\n" + |
|
128 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
129 |
"</dt>\n" + |
|
130 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
131 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
132 |
"</dl>"}, |
|
133 |
{BUG_ID + "/serialized-form.html", |
|
134 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
|
135 |
" <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
|
136 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 137 |
"<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
|
138 |
"<div class=\"block\">This field indicates whether the C1 is " + |
23971 | 139 |
"undecorated.</div>\n" + |
140 |
" \n" + |
|
141 |
"<dl>\n" + |
|
142 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
143 |
"<dd>1.4</dd>\n" + |
|
144 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
145 |
"</dt>\n" + |
|
146 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
147 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
148 |
"</dl>"}, |
|
149 |
{BUG_ID + "/serialized-form.html", |
|
150 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
|
151 |
" <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
|
152 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 153 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
154 |
"<div class=\"block\">Reads the object stream.</div>\n" + |
|
155 |
"<dl>\n" + |
|
156 |
"<dt><span class=\"throwsLabel\">Throws:" + |
|
157 |
"</span></dt>\n" + |
|
158 |
"<dd><code><code>" + |
|
159 |
"IOException</code></code></dd>\n" + |
|
160 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
161 |
"</dl>"}, |
|
162 |
{BUG_ID + "/serialized-form.html", |
|
163 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
|
164 |
" </div>\n" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
165 |
"<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
|
166 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
167 |
// 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
|
168 |
// 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
|
169 |
// 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
|
170 |
// 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
|
171 |
// and deprecated information. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
172 |
private static final String[][] TEST_NODEPR = { |
23971 | 173 |
{BUG_ID + "/pkg1/package-summary.html", "<dl>\n" + |
174 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
175 |
"<dd>JDK1.0</dd>\n" + |
|
176 |
"</dl>"}, |
|
177 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
178 |
"<dt><span class=\"simpleTagLabel\">Since:</span>" + |
|
179 |
"</dt>\n" + |
|
180 |
"<dd>JDK1.0</dd>\n" + |
|
181 |
"<dt><span class=\"seeLabel\">See Also:" + |
|
182 |
"</span></dt>\n" + |
|
183 |
"<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" + |
|
184 |
"<code>C2</code></a>, \n" + |
|
185 |
"<a href=\"../serialized-form.html#pkg1.C1\">" + |
|
186 |
"Serialized Form</a></dd>\n" + |
|
187 |
"</dl>"}, |
|
188 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
189 |
"<dt><span class=\"paramLabel\">Parameters:" + |
|
190 |
"</span></dt>\n" + |
|
191 |
"<dd><code>title</code> - the title</dd>\n" + |
|
192 |
"<dd><code>" + |
|
193 |
"test</code> - boolean value</dd>\n" + |
|
194 |
"<dt><span class=\"throwsLabel\">Throws:" + |
|
195 |
"</span></dt>\n" + |
|
196 |
"<dd><code>java.lang.IllegalArgumentException" + |
|
197 |
"</code> - if the <code>owner</code>'s\n" + |
|
198 |
" <code>GraphicsConfiguration" + |
|
199 |
"</code> is not from a screen device</dd>\n" + |
|
200 |
"<dd><code>" + |
|
201 |
"HeadlessException</code></dd>\n" + |
|
202 |
"</dl>"}, |
|
203 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
204 |
"<dt><span class=\"paramLabel\">Parameters:" + |
|
205 |
"</span></dt>\n" + |
|
206 |
"<dd><code>undecorated</code> - <code>true</code>" + |
|
207 |
" if no decorations are\n" + |
|
208 |
" 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
|
209 |
" <code>false</code> if decorations are to be enabled." + |
23971 | 210 |
"</dd>\n" + |
211 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
212 |
"<dd>1.4</dd>\n" + |
|
213 |
"<dt><span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
214 |
"<dd><a href=\"../pkg1/C1.html#readObject--\">" + |
|
215 |
"<code>readObject()</code></a></dd>\n" + |
|
216 |
"</dl>"}, |
|
217 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
218 |
"<dt><span class=\"throwsLabel\">Throws:</span>" + |
|
219 |
"</dt>\n" + |
|
220 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
221 |
"<dt>" + |
|
222 |
"<span class=\"seeLabel\">See Also:</span></dt>\n" + |
|
223 |
"<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + |
|
224 |
"<code>setUndecorated(boolean)</code></a></dd>\n" + |
|
225 |
"</dl>"}, |
|
226 |
{BUG_ID + "/serialized-form.html", "<dl>\n" + |
|
227 |
"<dt><span class=\"throwsLabel\">Throws:</span>" + |
|
228 |
"</dt>\n" + |
|
229 |
"<dd><code>" + |
|
230 |
"java.io.IOException</code></dd>\n" + |
|
231 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
232 |
"</dt>\n" + |
|
233 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
234 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
235 |
"</dl>"}, |
|
236 |
{BUG_ID + "/serialized-form.html", |
|
237 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
|
238 |
" <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
|
239 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 240 |
"<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
|
241 |
"<div class=\"block\">This field indicates whether the C1 is " + |
23971 | 242 |
"undecorated.</div>\n" + |
243 |
" \n" + |
|
244 |
"<dl>\n" + |
|
245 |
"<dt><span class=\"simpleTagLabel\">Since:</span></dt>\n" + |
|
246 |
"<dd>1.4</dd>\n" + |
|
247 |
"<dt><span class=\"seeLabel\">See Also:</span>" + |
|
248 |
"</dt>\n" + |
|
249 |
"<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
|
250 |
"<code>C1.setUndecorated(boolean)</code></a></dd>\n" + |
|
251 |
"</dl>"}, |
|
252 |
{BUG_ID + "/serialized-form.html", |
|
253 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
|
254 |
" <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
|
255 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 256 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
257 |
"<div class=\"block\">Reads the object stream.</div>\n" + |
|
258 |
"<dl>\n" + |
|
259 |
"<dt><span class=\"throwsLabel\">Throws:" + |
|
260 |
"</span></dt>\n" + |
|
261 |
"<dd><code><code>" + |
|
262 |
"IOException</code></code></dd>\n" + |
|
263 |
"<dd><code>java.io.IOException</code></dd>\n" + |
|
264 |
"</dl>"}, |
|
265 |
{BUG_ID + "/serialized-form.html", |
|
266 |
"<span class=\"deprecatedLabel\">Deprecated.</span>" + |
|
267 |
" </div>\n" + |
|
268 |
"<div class=\"block\">" + |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
269 |
"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
|
270 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
271 |
// 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
|
272 |
// 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
|
273 |
private static final String[][] TEST_NOCMNT_NODEPR = { |
23971 | 274 |
{BUG_ID + "/pkg1/C1.html", |
275 |
"<pre>public void readObject()\n" + |
|
276 |
" 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
|
277 |
"</li>"}, |
23971 | 278 |
{BUG_ID + "/pkg1/C2.html", "<pre>public C2()</pre>\n" + |
279 |
"</li>"}, |
|
280 |
{BUG_ID + "/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
|
281 |
"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
|
282 |
"title=\"enum in pkg1\">C1.ModalExclusionType</a> " + |
23971 | 283 |
"APPLICATION_EXCLUDE</pre>\n" + |
284 |
"</li>"}, |
|
285 |
{BUG_ID + "/serialized-form.html", "<pre>boolean " + |
|
286 |
"undecorated</pre>\n" + |
|
287 |
"<div class=\"block\"><span class=\"deprecatedLabel\">" + |
|
288 |
"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
|
289 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" + |
23971 | 290 |
"setUndecorated(boolean)</code></a>.</span></div>\n" + |
291 |
"</li>"}, |
|
292 |
{BUG_ID + "/serialized-form.html", "<span class=\"deprecatedLabel\">" + |
|
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
21008
diff
changeset
|
293 |
"Deprecated.</span> <span class=\"deprecationComment\">As of JDK version" + |
23971 | 294 |
" 1.5, replaced by\n" + |
21008
af0b915df7cc
8025633: Fix javadoc to generate valid anchor names
bpatel
parents:
19253
diff
changeset
|
295 |
" <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + |
23971 | 296 |
"<code>setUndecorated(boolean)</code></a>.</span></div>\n" + |
297 |
"</li>"}}; |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
298 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
299 |
// 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
|
300 |
// definition list tags. |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
301 |
private static final String[][] NEGATED_TEST = { |
23971 | 302 |
{BUG_ID + "/pkg1/package-summary.html", "<dl></dl>"}, |
303 |
{BUG_ID + "/pkg1/package-summary.html", "<dl>\n" + |
|
304 |
"</dl>"}, |
|
305 |
{BUG_ID + "/pkg1/C1.html", "<dl></dl>"}, |
|
306 |
{BUG_ID + "/pkg1/C1.html", "<dl>\n" + |
|
307 |
"</dl>"}, |
|
308 |
{BUG_ID + "/pkg1/C1.ModalExclusionType.html", "<dl></dl>"}, |
|
309 |
{BUG_ID + "/pkg1/C1.ModalExclusionType.html", "<dl>\n" + |
|
310 |
"</dl>"}, |
|
311 |
{BUG_ID + "/pkg1/C2.html", "<dl></dl>"}, |
|
312 |
{BUG_ID + "/pkg1/C2.html", "<dl>\n" + |
|
313 |
"</dl>"}, |
|
314 |
{BUG_ID + "/pkg1/C2.ModalType.html", "<dl></dl>"}, |
|
315 |
{BUG_ID + "/pkg1/C2.ModalType.html", "<dl>\n" + |
|
316 |
"</dl>"}, |
|
317 |
{BUG_ID + "/pkg1/C3.html", "<dl></dl>"}, |
|
318 |
{BUG_ID + "/pkg1/C3.html", "<dl>\n" + |
|
319 |
"</dl>"}, |
|
320 |
{BUG_ID + "/pkg1/C4.html", "<dl></dl>"}, |
|
321 |
{BUG_ID + "/pkg1/C4.html", "<dl>\n" + |
|
322 |
"</dl>"}, |
|
323 |
{BUG_ID + "/pkg1/C5.html", "<dl></dl>"}, |
|
324 |
{BUG_ID + "/pkg1/C5.html", "<dl>\n" + |
|
325 |
"</dl>"}, |
|
326 |
{BUG_ID + "/overview-tree.html", "<dl></dl>"}, |
|
327 |
{BUG_ID + "/overview-tree.html", "<dl>\n" + |
|
328 |
"</dl>"}, |
|
329 |
{BUG_ID + "/serialized-form.html", "<dl></dl>"}, |
|
330 |
{BUG_ID + "/serialized-form.html", "<dl>\n" + |
|
331 |
"</dl>"}}; |
|
2216
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
332 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
333 |
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
|
334 |
new String[] { |
15354 | 335 |
"-Xdoclint:none", "-d", BUG_ID, "-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
|
336 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
337 |
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
|
338 |
new String[] { |
23971 | 339 |
"-Xdoclint:none", "-d", BUG_ID, "-nocomment", "-sourcepath", |
340 |
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
|
341 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
342 |
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
|
343 |
new String[] { |
23971 | 344 |
"-Xdoclint:none", "-d", BUG_ID, "-nodeprecated", "-sourcepath", |
345 |
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
|
346 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
347 |
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
|
348 |
new String[] { |
23971 | 349 |
"-Xdoclint:none", "-d", BUG_ID, "-nocomment", "-nodeprecated", |
350 |
"-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
|
351 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
352 |
/** |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
353 |
* 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
|
354 |
* @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
|
355 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
356 |
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
|
357 |
TestHtmlDefinitionListTag tester = new TestHtmlDefinitionListTag(); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
358 |
run(tester, ARGS1, TEST_ALL, NEGATED_TEST); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
359 |
run(tester, ARGS1, TEST_CMNT_DEPR, NEGATED_TEST); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
360 |
run(tester, ARGS2, TEST_ALL, NEGATED_TEST); |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
361 |
run(tester, ARGS2, NO_TEST, 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
|
362 |
run(tester, ARGS3, TEST_ALL, NEGATED_TEST); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
363 |
run(tester, ARGS3, TEST_NODEPR, TEST_NOCMNT_NODEPR); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
364 |
run(tester, ARGS4, TEST_ALL, NEGATED_TEST); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
365 |
run(tester, ARGS4, TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
366 |
tester.printSummary(); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
367 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
368 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
369 |
/** |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
370 |
* {@inheritDoc} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
371 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
372 |
public String getBugId() { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
373 |
return BUG_ID; |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
374 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
375 |
|
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
376 |
/** |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
377 |
* {@inheritDoc} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
378 |
*/ |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
379 |
public String getBugName() { |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
380 |
return getClass().getName(); |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
381 |
} |
b124d5c924eb
6786690: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - DL tag and nesting issue
bpatel
parents:
diff
changeset
|
382 |
} |