author | janvalenta |
Thu, 27 Jun 2013 17:47:18 +0200 | |
changeset 18659 | 5fe5650da7f9 |
parent 18650 | 3a11154f1154 |
child 19922 | 52810e1bbb4f |
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 |
|
18650 | 26 |
* @bug 4494033 7028815 7052425 8007338 |
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", |
18650 | 62 |
".overviewSummary caption, .packageSummary caption, " + |
63 |
".contentContainer ul.blockList li.blockList caption, " + |
|
64 |
".summary caption, .classUseContainer caption, " + |
|
65 |
".constantValuesContainer caption {" + NL + |
|
66 |
" position:relative;" + NL + |
|
67 |
" text-align:left;" + NL + |
|
68 |
" background-repeat:no-repeat;" + NL + |
|
69 |
" color:#FFFFFF;" + NL + |
|
70 |
" font-weight:bold;" + NL + |
|
71 |
" clear:none;" + NL + |
|
72 |
" overflow:hidden;" + NL + |
|
73 |
" padding:0px;" + NL + |
|
74 |
" margin:0px;" + NL + |
|
75 |
" white-space:pre;" + NL + |
|
76 |
"}"}, |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
77 |
// 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
|
78 |
// in the class documentation. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
79 |
{BUG_ID + FS + "pkg" + FS + "A.html", |
18650 | 80 |
"<link rel=\"stylesheet\" type=\"text/css\" " + |
81 |
"href=\"../stylesheet.css\" title=\"Style\">"} |
|
10 | 82 |
}; |
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
83 |
private static final String[][] NEGATED_TEST = { |
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
84 |
{BUG_ID + FS + "stylesheet.css", |
18650 | 85 |
"* {" + 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
|
86 |
}; |
10 | 87 |
|
88 |
/** |
|
89 |
* The entry point of the test. |
|
90 |
* @param args the array of command line arguments. |
|
91 |
*/ |
|
92 |
public static void main(String[] args) { |
|
93 |
TestStylesheet tester = new TestStylesheet(); |
|
94 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
95 |
tester.printSummary(); |
|
96 |
} |
|
97 |
||
98 |
/** |
|
99 |
* {@inheritDoc} |
|
100 |
*/ |
|
101 |
public String getBugId() { |
|
102 |
return BUG_ID; |
|
103 |
} |
|
104 |
||
105 |
/** |
|
106 |
* {@inheritDoc} |
|
107 |
*/ |
|
108 |
public String getBugName() { |
|
109 |
return getClass().getName(); |
|
110 |
} |
|
111 |
} |