author | bpatel |
Fri, 04 Oct 2013 13:32:30 -0700 | |
changeset 20613 | ab4801a53abb |
child 23971 | f5ff1f5a8dee |
permissions | -rw-r--r-- |
20613
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
1 |
/* |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
2 |
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
4 |
* |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
8 |
* |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
13 |
* accompanied this code). |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
14 |
* |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
18 |
* |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
21 |
* questions. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
22 |
*/ |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
23 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
24 |
/* |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
25 |
* @test |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
26 |
* @bug 8008164 |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
27 |
* @summary Test styles on HTML tables generated by javadoc. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
28 |
* @author Bhavesh Patel |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
29 |
* @library ../lib/ |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
30 |
* @build JavadocTester TestHtmlTableStyles |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
31 |
* @run main TestHtmlTableStyles |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
32 |
*/ |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
33 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
34 |
public class TestHtmlTableStyles extends JavadocTester { |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
35 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
36 |
private static final String BUG_ID = "8008164"; |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
37 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
38 |
//Input for string search tests. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
39 |
private static final String[][] TEST = { |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
40 |
{BUG_ID + FS + "pkg1" + FS + "TestTable.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
41 |
"<table border cellpadding=3 cellspacing=1>" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
42 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
43 |
{BUG_ID + FS + "pkg1" + FS + "TestTable.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
44 |
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
45 |
"cellspacing=\"0\" summary=\"Field Summary table, listing fields, " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
46 |
"and an explanation\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
47 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
48 |
{BUG_ID + FS + "pkg1" + FS + "TestTable.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
49 |
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
50 |
"cellspacing=\"0\" summary=\"Constructor Summary table, listing " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
51 |
"constructors, and an explanation\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
52 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
53 |
{BUG_ID + FS + "pkg1" + FS + "TestTable.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
54 |
"<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
55 |
"cellspacing=\"0\" summary=\"Method Summary table, listing methods, " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
56 |
"and an explanation\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
57 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
58 |
{BUG_ID + FS + "pkg1" + FS + "package-summary.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
59 |
"<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
60 |
"cellspacing=\"0\" summary=\"Class Summary table, listing classes, " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
61 |
"and an explanation\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
62 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
63 |
{BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "TestTable.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
64 |
"<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
65 |
"cellspacing=\"0\" summary=\"Use table, listing fields, and an explanation\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
66 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
67 |
{BUG_ID + FS + "overview-summary.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
68 |
"<table class=\"overviewSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
69 |
"cellspacing=\"0\" summary=\"Packages table, listing packages, and an explanation\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
70 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
71 |
{BUG_ID + FS + "deprecated-list.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
72 |
"<table class=\"deprecatedSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
73 |
"cellspacing=\"0\" summary=\"Deprecated Methods table, listing " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
74 |
"deprecated methods, and an explanation\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
75 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
76 |
{BUG_ID + FS + "constant-values.html", |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
77 |
"<table class=\"constantsSummary\" border=\"0\" cellpadding=\"3\" " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
78 |
"cellspacing=\"0\" summary=\"Constant Field Values table, listing " + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
79 |
"constant fields, and values\">" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
80 |
}, |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
81 |
}; |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
82 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
83 |
private static final String[] ARGS = new String[] { |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
84 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1", "pkg2" |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
85 |
}; |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
86 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
87 |
/** |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
88 |
* The entry point of the test. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
89 |
* @param args the array of command line arguments. |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
90 |
*/ |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
91 |
public static void main(String[] args) throws Exception { |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
92 |
TestHtmlTableStyles tester = new TestHtmlTableStyles(); |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
93 |
run(tester, ARGS, TEST, NO_TEST); |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
94 |
tester.printSummary(); |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
95 |
} |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
96 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
97 |
/** |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
98 |
* {@inheritDoc} |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
99 |
*/ |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
100 |
public String getBugId() { |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
101 |
return BUG_ID; |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
102 |
} |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
103 |
|
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
104 |
/** |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
105 |
* {@inheritDoc} |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
106 |
*/ |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
107 |
public String getBugName() { |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
108 |
return getClass().getName(); |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
109 |
} |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
diff
changeset
|
110 |
} |