author | psandoz |
Mon, 25 Nov 2013 09:55:34 +0100 | |
changeset 21846 | c10feb34bc0b |
parent 20613 | ab4801a53abb |
child 22447 | 364fe5d83775 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
18650 | 2 |
* Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. |
10 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. |
|
8 |
* |
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
13 |
* accompanied this code). |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License version |
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
18 |
* |
|
5520 | 19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 |
* or visit www.oracle.com if you need additional information or have any |
|
21 |
* questions. |
|
10 | 22 |
*/ |
23 |
||
24 |
/* |
|
25 |
* @test |
|
20613
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
26 |
* @bug 4494033 7028815 7052425 8007338 8023608 8008164 |
10 | 27 |
* @summary Run tests on doclet stylesheet. |
28 |
* @author jamieh |
|
29 |
* @library ../lib/ |
|
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
30 |
* @build JavadocTester TestStylesheet |
10 | 31 |
* @run main TestStylesheet |
32 |
*/ |
|
33 |
||
34 |
public class TestStylesheet extends JavadocTester { |
|
35 |
||
36 |
//Test information. |
|
18650 | 37 |
private static final String BUG_ID = "4494033-7028815-7052425-8007338"; |
10 | 38 |
|
39 |
//Javadoc arguments. |
|
40 |
private static final String[] ARGS = new String[] { |
|
41 |
"-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" |
|
42 |
}; |
|
43 |
||
44 |
//Input for string search tests. |
|
45 |
private static final String[][] TEST = { |
|
46 |
{BUG_ID + FS + "stylesheet.css", |
|
18650 | 47 |
"/* Javadoc style sheet */"}, |
48 |
{BUG_ID + FS + "stylesheet.css", |
|
49 |
"/*" + NL + "Overall document style" + NL + "*/"}, |
|
50 |
{BUG_ID + FS + "stylesheet.css", |
|
51 |
"/*" + NL + "Heading styles" + NL + "*/"}, |
|
10 | 52 |
{BUG_ID + FS + "stylesheet.css", |
18650 | 53 |
"/*" + NL + "Navigation bar styles" + NL + "*/"}, |
10 | 54 |
{BUG_ID + FS + "stylesheet.css", |
18650 | 55 |
"body {" + NL + " background-color:#ffffff;" + NL + |
56 |
" color:#353833;" + NL + |
|
57 |
" font-family:Arial, Helvetica, sans-serif;" + NL + |
|
58 |
" font-size:76%;" + NL + " margin:0;" + NL + "}"}, |
|
59 |
{BUG_ID + FS + "stylesheet.css", |
|
60 |
"ul {" + NL + " list-style-type:disc;" + NL + "}"}, |
|
10 | 61 |
{BUG_ID + FS + "stylesheet.css", |
20613
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
62 |
".overviewSummary caption, .memberSummary caption, .typeSummary caption," + NL + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
63 |
".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {" + NL + |
18650 | 64 |
" position:relative;" + NL + |
65 |
" text-align:left;" + NL + |
|
66 |
" background-repeat:no-repeat;" + NL + |
|
67 |
" color:#FFFFFF;" + NL + |
|
68 |
" font-weight:bold;" + NL + |
|
69 |
" clear:none;" + NL + |
|
70 |
" overflow:hidden;" + NL + |
|
71 |
" padding:0px;" + NL + |
|
72 |
" margin:0px;" + NL + |
|
19922 | 73 |
"}"}, |
74 |
{BUG_ID + FS + "stylesheet.css", |
|
20613
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
75 |
".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span," + NL + |
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
76 |
".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {" + NL + |
19922 | 77 |
" white-space:nowrap;" + NL + |
78 |
" padding-top:8px;" + NL + |
|
79 |
" padding-left:8px;" + NL + |
|
80 |
" display:inline-block;" + NL + |
|
81 |
" float:left;" + NL + |
|
82 |
" background-image:url(resources/titlebar.gif);" + NL + |
|
83 |
"}"}, |
|
84 |
{BUG_ID + FS + "stylesheet.css", |
|
20613
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
85 |
".memberSummary caption span.activeTableTab span {" + NL + |
19922 | 86 |
" white-space:nowrap;" + NL + |
87 |
" padding-top:8px;" + NL + |
|
88 |
" padding-left:8px;" + NL + |
|
89 |
" display:inline-block;" + NL + |
|
90 |
" float:left;" + NL + |
|
91 |
" background-image:url(resources/activetitlebar.gif);" + NL + |
|
92 |
"}"}, |
|
93 |
{BUG_ID + FS + "stylesheet.css", |
|
20613
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
94 |
".memberSummary caption span.tableTab span {" + NL + |
19922 | 95 |
" white-space:nowrap;" + NL + |
96 |
" padding-top:8px;" + NL + |
|
97 |
" padding-left:8px;" + NL + |
|
98 |
" display:inline-block;" + NL + |
|
99 |
" float:left;" + NL + |
|
100 |
" background-image:url(resources/titlebar.gif);" + NL + |
|
101 |
"}"}, |
|
102 |
{BUG_ID + FS + "stylesheet.css", |
|
20613
ab4801a53abb
8008164: Invisible table captions in javadoc-generated html
bpatel
parents:
19922
diff
changeset
|
103 |
".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {" + NL + |
19922 | 104 |
" padding-top:0px;" + NL + |
105 |
" padding-left:0px;" + NL + |
|
106 |
" background-image:none;" + NL + |
|
107 |
" float:none;" + NL + |
|
108 |
" display:inline-block;" + NL + |
|
18650 | 109 |
"}"}, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
110 |
// Test whether a link to the stylesheet file is inserted properly |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
111 |
// in the class documentation. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
112 |
{BUG_ID + FS + "pkg" + FS + "A.html", |
18650 | 113 |
"<link rel=\"stylesheet\" type=\"text/css\" " + |
114 |
"href=\"../stylesheet.css\" title=\"Style\">"} |
|
10 | 115 |
}; |
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
116 |
private static final String[][] NEGATED_TEST = { |
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
117 |
{BUG_ID + FS + "stylesheet.css", |
18650 | 118 |
"* {" + NL + " margin:0;" + NL + " padding:0;" + NL + "}"} |
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
119 |
}; |
10 | 120 |
|
121 |
/** |
|
122 |
* The entry point of the test. |
|
123 |
* @param args the array of command line arguments. |
|
124 |
*/ |
|
125 |
public static void main(String[] args) { |
|
126 |
TestStylesheet tester = new TestStylesheet(); |
|
127 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
128 |
tester.printSummary(); |
|
129 |
} |
|
130 |
||
131 |
/** |
|
132 |
* {@inheritDoc} |
|
133 |
*/ |
|
134 |
public String getBugId() { |
|
135 |
return BUG_ID; |
|
136 |
} |
|
137 |
||
138 |
/** |
|
139 |
* {@inheritDoc} |
|
140 |
*/ |
|
141 |
public String getBugName() { |
|
142 |
return getClass().getName(); |
|
143 |
} |
|
144 |
} |