author | jjg |
Fri, 25 Apr 2014 13:08:41 -0700 | |
changeset 24217 | 25b12d4d4192 |
parent 24072 | e7549dcbc4af |
child 24399 | af1a0220d0fa |
permissions | -rw-r--r-- |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
1 |
/* |
23971 | 2 |
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
4 |
* |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
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 |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
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. |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
10 |
* |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
15 |
* accompanied this code). |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
16 |
* |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
17 |
* You should have received a copy of the GNU General Public License version |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
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. |
|
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
24 |
*/ |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
25 |
|
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
26 |
/* |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
27 |
* @test |
21478
fa4c7cda1b41
8026567: Use meaningful style names for strong and italic styles.
bpatel
parents:
7681
diff
changeset
|
28 |
* @bug 6786028 8026567 |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
29 |
* @summary This test verifys the use of <strong> HTML tag instead of <B> by Javadoc std doclet. |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
30 |
* @author Bhavesh Patel |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
31 |
* @library ../lib/ |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
32 |
* @build JavadocTester |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
33 |
* @build TestHtmlStrongTag |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
34 |
* @run main TestHtmlStrongTag |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
35 |
*/ |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
36 |
|
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
37 |
public class TestHtmlStrongTag extends JavadocTester { |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
38 |
|
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
39 |
private static final String[][] TEST1 = { |
24072 | 40 |
{ "pkg1/C1.html", |
23971 | 41 |
"<span class=\"seeLabel\">See Also:</span>"}}; |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
42 |
private static final String[][] NEGATED_TEST1 = { |
24072 | 43 |
{ "pkg1/C1.html", "<STRONG>Method Summary</STRONG>"}, |
44 |
{ "pkg1/C1.html", "<B>"}, |
|
45 |
{ "pkg1/package-summary.html", |
|
23971 | 46 |
"<STRONG>Class Summary</STRONG>"}}; |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
47 |
private static final String[][] TEST2 = { |
24072 | 48 |
{ "pkg2/C2.html", "<B>Comments:</B>"}}; |
2320
5b8c377175f4
6786688: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Table must have captions and headers
bpatel
parents:
1787
diff
changeset
|
49 |
private static final String[][] NEGATED_TEST2 = { |
24217
25b12d4d4192
8040904: Ensure javadoc tests do not overwrite results within tests
jjg
parents:
24072
diff
changeset
|
50 |
{ "pkg2/C2.html", "<STRONG>Method Summary</STRONG>"}}; |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
51 |
|
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
52 |
private static final String[] ARGS1 = |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
53 |
new String[] { |
24217
25b12d4d4192
8040904: Ensure javadoc tests do not overwrite results within tests
jjg
parents:
24072
diff
changeset
|
54 |
"-d", OUTPUT_DIR + "-1", "-sourcepath", SRC_DIR, "pkg1"}; |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
55 |
private static final String[] ARGS2 = |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
56 |
new String[] { |
24217
25b12d4d4192
8040904: Ensure javadoc tests do not overwrite results within tests
jjg
parents:
24072
diff
changeset
|
57 |
"-d", OUTPUT_DIR + "-2", "-sourcepath", SRC_DIR, "pkg2"}; |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
58 |
|
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
59 |
/** |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
60 |
* The entry point of the test. |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
61 |
* @param args the array of command line arguments. |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
62 |
*/ |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
63 |
public static void main(String[] args) { |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
64 |
TestHtmlStrongTag tester = new TestHtmlStrongTag(); |
24065
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
65 |
tester.run(ARGS1, TEST1, NEGATED_TEST1); |
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
66 |
tester.run(ARGS2, TEST2, NEGATED_TEST2); |
1787
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
67 |
tester.printSummary(); |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
68 |
} |
1aa079321cd2
6786028: Javadoc HTML WCAG 2.0 accessibility issues in standard doclet - Bold tags should be strong
bpatel
parents:
diff
changeset
|
69 |
} |