31 * @run main TestStylesheet |
31 * @run main TestStylesheet |
32 */ |
32 */ |
33 |
33 |
34 public class TestStylesheet extends JavadocTester { |
34 public class TestStylesheet extends JavadocTester { |
35 |
35 |
36 //Test information. |
|
37 private static final String BUG_ID = "4494033-7028815-7052425-8007338"; |
|
38 |
|
39 //Javadoc arguments. |
36 //Javadoc arguments. |
40 private static final String[] ARGS = new String[] { |
37 private static final String[] ARGS = new String[] { |
41 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" |
38 "-d", OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg" |
42 }; |
39 }; |
43 |
40 |
44 //Input for string search tests. |
41 //Input for string search tests. |
45 private static final String[][] TEST = { |
42 private static final String[][] TEST = { |
46 {BUG_ID + "/stylesheet.css", |
43 { "stylesheet.css", |
47 "/* Javadoc style sheet */"}, |
44 "/* Javadoc style sheet */"}, |
48 {BUG_ID + "/stylesheet.css", |
45 { "stylesheet.css", |
49 "/*\n" + |
46 "/*\n" + |
50 "Overall document style\n" + |
47 "Overall document style\n" + |
51 "*/"}, |
48 "*/"}, |
52 {BUG_ID + "/stylesheet.css", |
49 { "stylesheet.css", |
53 "/*\n" + |
50 "/*\n" + |
54 "Heading styles\n" + |
51 "Heading styles\n" + |
55 "*/"}, |
52 "*/"}, |
56 {BUG_ID + "/stylesheet.css", |
53 { "stylesheet.css", |
57 "/*\n" + |
54 "/*\n" + |
58 "Navigation bar styles\n" + |
55 "Navigation bar styles\n" + |
59 "*/"}, |
56 "*/"}, |
60 {BUG_ID + "/stylesheet.css", |
57 { "stylesheet.css", |
61 "body {\n" + |
58 "body {\n" + |
62 " background-color:#ffffff;\n" + |
59 " background-color:#ffffff;\n" + |
63 " color:#353833;\n" + |
60 " color:#353833;\n" + |
64 " font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;\n" + |
61 " font-family:'DejaVu Sans', Arial, Helvetica, sans-serif;\n" + |
65 " font-size:14px;\n" + |
62 " font-size:14px;\n" + |
66 " margin:0;\n" + |
63 " margin:0;\n" + |
67 "}"}, |
64 "}"}, |
68 {BUG_ID + "/stylesheet.css", |
65 { "stylesheet.css", |
69 "ul {\n" + |
66 "ul {\n" + |
70 " list-style-type:disc;\n" + |
67 " list-style-type:disc;\n" + |
71 "}"}, |
68 "}"}, |
72 {BUG_ID + "/stylesheet.css", |
69 { "stylesheet.css", |
73 ".overviewSummary caption, .memberSummary caption, .typeSummary caption,\n" + |
70 ".overviewSummary caption, .memberSummary caption, .typeSummary caption,\n" + |
74 ".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {\n" + |
71 ".useSummary caption, .constantsSummary caption, .deprecatedSummary caption {\n" + |
75 " position:relative;\n" + |
72 " position:relative;\n" + |
76 " text-align:left;\n" + |
73 " text-align:left;\n" + |
77 " background-repeat:no-repeat;\n" + |
74 " background-repeat:no-repeat;\n" + |
83 " padding-top:10px;\n" + |
80 " padding-top:10px;\n" + |
84 " padding-left:1px;\n" + |
81 " padding-left:1px;\n" + |
85 " margin:0px;\n" + |
82 " margin:0px;\n" + |
86 " white-space:pre;\n" + |
83 " white-space:pre;\n" + |
87 "}"}, |
84 "}"}, |
88 {BUG_ID + "/stylesheet.css", |
85 { "stylesheet.css", |
89 ".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,\n" + |
86 ".overviewSummary caption span, .memberSummary caption span, .typeSummary caption span,\n" + |
90 ".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {\n" + |
87 ".useSummary caption span, .constantsSummary caption span, .deprecatedSummary caption span {\n" + |
91 " white-space:nowrap;\n" + |
88 " white-space:nowrap;\n" + |
92 " padding-top:5px;\n" + |
89 " padding-top:5px;\n" + |
93 " padding-left:12px;\n" + |
90 " padding-left:12px;\n" + |
97 " float:left;\n" + |
94 " float:left;\n" + |
98 " background-color:#F8981D;\n" + |
95 " background-color:#F8981D;\n" + |
99 " border: none;\n" + |
96 " border: none;\n" + |
100 " height:16px;\n" + |
97 " height:16px;\n" + |
101 "}"}, |
98 "}"}, |
102 {BUG_ID + "/stylesheet.css", |
99 { "stylesheet.css", |
103 ".memberSummary caption span.activeTableTab span {\n" + |
100 ".memberSummary caption span.activeTableTab span {\n" + |
104 " white-space:nowrap;\n" + |
101 " white-space:nowrap;\n" + |
105 " padding-top:5px;\n" + |
102 " padding-top:5px;\n" + |
106 " padding-left:12px;\n" + |
103 " padding-left:12px;\n" + |
107 " padding-right:12px;\n" + |
104 " padding-right:12px;\n" + |
109 " display:inline-block;\n" + |
106 " display:inline-block;\n" + |
110 " float:left;\n" + |
107 " float:left;\n" + |
111 " background-color:#F8981D;\n" + |
108 " background-color:#F8981D;\n" + |
112 " height:16px;\n" + |
109 " height:16px;\n" + |
113 "}"}, |
110 "}"}, |
114 {BUG_ID + "/stylesheet.css", |
111 { "stylesheet.css", |
115 ".memberSummary caption span.tableTab span {\n" + |
112 ".memberSummary caption span.tableTab span {\n" + |
116 " white-space:nowrap;\n" + |
113 " white-space:nowrap;\n" + |
117 " padding-top:5px;\n" + |
114 " padding-top:5px;\n" + |
118 " padding-left:12px;\n" + |
115 " padding-left:12px;\n" + |
119 " padding-right:12px;\n" + |
116 " padding-right:12px;\n" + |
121 " display:inline-block;\n" + |
118 " display:inline-block;\n" + |
122 " float:left;\n" + |
119 " float:left;\n" + |
123 " background-color:#4D7A97;\n" + |
120 " background-color:#4D7A97;\n" + |
124 " height:16px;\n" + |
121 " height:16px;\n" + |
125 "}"}, |
122 "}"}, |
126 {BUG_ID + "/stylesheet.css", |
123 { "stylesheet.css", |
127 ".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {\n" + |
124 ".memberSummary caption span.tableTab, .memberSummary caption span.activeTableTab {\n" + |
128 " padding-top:0px;\n" + |
125 " padding-top:0px;\n" + |
129 " padding-left:0px;\n" + |
126 " padding-left:0px;\n" + |
130 " padding-right:0px;\n" + |
127 " padding-right:0px;\n" + |
131 " background-image:none;\n" + |
128 " background-image:none;\n" + |
132 " float:none;\n" + |
129 " float:none;\n" + |
133 " display:inline;\n" + |
130 " display:inline;\n" + |
134 "}"}, |
131 "}"}, |
135 {BUG_ID + "/stylesheet.css", |
132 { "stylesheet.css", |
136 "@import url('resources/fonts/dejavu.css');"}, |
133 "@import url('resources/fonts/dejavu.css');"}, |
137 // Test whether a link to the stylesheet file is inserted properly |
134 // Test whether a link to the stylesheet file is inserted properly |
138 // in the class documentation. |
135 // in the class documentation. |
139 {BUG_ID + "/pkg/A.html", |
136 { "pkg/A.html", |
140 "<link rel=\"stylesheet\" type=\"text/css\" " + |
137 "<link rel=\"stylesheet\" type=\"text/css\" " + |
141 "href=\"../stylesheet.css\" title=\"Style\">"} |
138 "href=\"../stylesheet.css\" title=\"Style\">"} |
142 }; |
139 }; |
143 private static final String[][] NEGATED_TEST = { |
140 private static final String[][] NEGATED_TEST = { |
144 {BUG_ID + "/stylesheet.css", |
141 { "stylesheet.css", |
145 "* {\n" + |
142 "* {\n" + |
146 " margin:0;\n" + |
143 " margin:0;\n" + |
147 " padding:0;\n" + |
144 " padding:0;\n" + |
148 "}"} |
145 "}"} |
149 }; |
146 }; |
155 public static void main(String[] args) { |
152 public static void main(String[] args) { |
156 TestStylesheet tester = new TestStylesheet(); |
153 TestStylesheet tester = new TestStylesheet(); |
157 tester.run(ARGS, TEST, NEGATED_TEST); |
154 tester.run(ARGS, TEST, NEGATED_TEST); |
158 tester.printSummary(); |
155 tester.printSummary(); |
159 } |
156 } |
160 |
|
161 /** |
|
162 * {@inheritDoc} |
|
163 */ |
|
164 public String getBugId() { |
|
165 return BUG_ID; |
|
166 } |
|
167 |
|
168 /** |
|
169 * {@inheritDoc} |
|
170 */ |
|
171 public String getBugName() { |
|
172 return getClass().getName(); |
|
173 } |
|
174 } |
157 } |