author | jjg |
Tue, 22 Apr 2014 17:57:40 -0700 | |
changeset 24072 | e7549dcbc4af |
parent 24065 | fc4022e50129 |
child 24399 | af1a0220d0fa |
permissions | -rw-r--r-- |
10 | 1 |
/* |
23971 | 2 |
* Copyright (c) 2005, 2014, 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 |
|
22447 | 26 |
* @bug 4494033 7028815 7052425 8007338 8023608 8008164 8016549 |
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 |
//Javadoc arguments. |
|
37 |
private static final String[] ARGS = new String[] { |
|
24072 | 38 |
"-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" |
10 | 39 |
}; |
40 |
||
41 |
//Input for string search tests. |
|
42 |
private static final String[][] TEST = { |
|
24072 | 43 |
{ "stylesheet.css", |
18650 | 44 |
"/* Javadoc style sheet */"}, |
24072 | 45 |
{ "stylesheet.css", |
23971 | 46 |
"/*\n" + |
47 |
"Overall document style\n" + |
|
48 |
"*/"}, |
|
24072 | 49 |
{ "stylesheet.css", |
23971 | 50 |
"/*\n" + |
51 |
"Heading styles\n" + |
|
52 |
"*/"}, |
|
24072 | 53 |
{ "stylesheet.css", |
23971 | 54 |
"/*\n" + |
55 |
"Navigation bar styles\n" + |
|
56 |
"*/"}, |
|
24072 | 57 |
{ "stylesheet.css", |
23971 | 58 |
"body {\n" + |
59 |
" background-color:#ffffff;\n" + |
|
60 |
" color:#353833;\n" + |
|
61 |
" font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;\n" + |
|
62 |
" font-size:14px;\n" + |
|
63 |
" margin:0;\n" + |
|
64 |
"}"}, |
|
24072 | 65 |
{ "stylesheet.css", |
23971 | 66 |
"ul {\n" + |
67 |
" list-style-type:disc;\n" + |
|
68 |
"}"}, |
|
24072 | 69 |
{ "stylesheet.css", |
23971 | 70 |
".overviewSummary caption, .memberSummary caption, .typeSummary caption,\n" + |
71 |
".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {\n" + |
|
72 |
" position:relative;\n" + |
|
73 |
" text-align:left;\n" + |
|
74 |
" background-repeat:no-repeat;\n" + |
|
75 |
" color:#253441;\n" + |
|
76 |
" font-weight:bold;\n" + |
|
77 |
" clear:none;\n" + |
|
78 |
" overflow:hidden;\n" + |
|
79 |
" padding:0px;\n" + |
|
80 |
" padding-top:10px;\n" + |
|
81 |
" padding-left:1px;\n" + |
|
82 |
" margin:0px;\n" + |
|
83 |
" white-space:pre;\n" + |
|
19922 | 84 |
"}"}, |
24072 | 85 |
{ "stylesheet.css", |
23971 | 86 |
".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,\n" + |
87 |
".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {\n" + |
|
88 |
" white-space:nowrap;\n" + |
|
89 |
" padding-top:5px;\n" + |
|
90 |
" padding-left:12px;\n" + |
|
91 |
" padding-right:12px;\n" + |
|
92 |
" padding-bottom:7px;\n" + |
|
93 |
" display:inline-block;\n" + |
|
94 |
" float:left;\n" + |
|
95 |
" background-color:#F8981D;\n" + |
|
96 |
" border: none;\n" + |
|
97 |
" height:16px;\n" + |
|
19922 | 98 |
"}"}, |
24072 | 99 |
{ "stylesheet.css", |
23971 | 100 |
".memberSummary caption span.activeTableTab span {\n" + |
101 |
" white-space:nowrap;\n" + |
|
102 |
" padding-top:5px;\n" + |
|
103 |
" padding-left:12px;\n" + |
|
104 |
" padding-right:12px;\n" + |
|
105 |
" margin-right:3px;\n" + |
|
106 |
" display:inline-block;\n" + |
|
107 |
" float:left;\n" + |
|
108 |
" background-color:#F8981D;\n" + |
|
109 |
" height:16px;\n" + |
|
19922 | 110 |
"}"}, |
24072 | 111 |
{ "stylesheet.css", |
23971 | 112 |
".memberSummary caption span.tableTab span {\n" + |
113 |
" white-space:nowrap;\n" + |
|
114 |
" padding-top:5px;\n" + |
|
115 |
" padding-left:12px;\n" + |
|
116 |
" padding-right:12px;\n" + |
|
117 |
" margin-right:3px;\n" + |
|
118 |
" display:inline-block;\n" + |
|
119 |
" float:left;\n" + |
|
120 |
" background-color:#4D7A97;\n" + |
|
121 |
" height:16px;\n" + |
|
19922 | 122 |
"}"}, |
24072 | 123 |
{ "stylesheet.css", |
23971 | 124 |
".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {\n" + |
125 |
" padding-top:0px;\n" + |
|
126 |
" padding-left:0px;\n" + |
|
127 |
" padding-right:0px;\n" + |
|
128 |
" background-image:none;\n" + |
|
129 |
" float:none;\n" + |
|
130 |
" display:inline;\n" + |
|
18650 | 131 |
"}"}, |
24072 | 132 |
{ "stylesheet.css", |
22447 | 133 |
"@import url('resources/fonts/dejavu.css');"}, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
134 |
// 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
|
135 |
// in the class documentation. |
24072 | 136 |
{ "pkg/A.html", |
18650 | 137 |
"<link rel=\"stylesheet\" type=\"text/css\" " + |
138 |
"href=\"../stylesheet.css\" title=\"Style\">"} |
|
10 | 139 |
}; |
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
140 |
private static final String[][] NEGATED_TEST = { |
24072 | 141 |
{ "stylesheet.css", |
23971 | 142 |
"* {\n" + |
143 |
" margin:0;\n" + |
|
144 |
" padding:0;\n" + |
|
145 |
"}"} |
|
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
146 |
}; |
10 | 147 |
|
148 |
/** |
|
149 |
* The entry point of the test. |
|
150 |
* @param args the array of command line arguments. |
|
151 |
*/ |
|
152 |
public static void main(String[] args) { |
|
153 |
TestStylesheet tester = new TestStylesheet(); |
|
24065
fc4022e50129
8041150: Avoid silly use of static methods in JavadocTester
jjg
parents:
23971
diff
changeset
|
154 |
tester.run(ARGS, TEST, NEGATED_TEST); |
10 | 155 |
tester.printSummary(); |
156 |
} |
|
157 |
} |