author | bpatel |
Wed, 27 Apr 2011 17:13:54 -0700 | |
changeset 9597 | d9c8a0010a9a |
parent 7681 | 1f0819a3341f |
child 9894 | a0ec54adb051 |
permissions | -rw-r--r-- |
10 | 1 |
/* |
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
2 |
* Copyright (c) 2005, 2011, 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 |
|
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
26 |
* @bug 4494033 7028815 |
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. |
|
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
37 |
private static final String BUG_ID = "4494033-7028815"; |
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", |
|
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
47 |
"/* Javadoc style sheet */"}, |
10 | 48 |
{BUG_ID + FS + "stylesheet.css", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
49 |
"/*" + NL + "Overall document style" + NL + "*/"}, |
10 | 50 |
{BUG_ID + FS + "stylesheet.css", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
51 |
"/*" + NL + "Heading styles" + NL + "*/"}, |
10 | 52 |
{BUG_ID + FS + "stylesheet.css", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
53 |
"/*" + NL + "Navigation bar styles" + NL + "*/"}, |
10 | 54 |
{BUG_ID + FS + "stylesheet.css", |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
55 |
"body {" + NL + " font-family:Helvetica, Arial, sans-serif;" + NL + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
56 |
" color:#000000;" + NL + "}"}, |
10 | 57 |
{BUG_ID + FS + "stylesheet.css", |
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
58 |
"ul {" + NL + " margin:10px 0 10px 20px;" + NL + |
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
59 |
" list-style-type:disc;" + NL + "}"}, |
7614
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
60 |
// 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
|
61 |
// in the class documentation. |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
62 |
{BUG_ID + FS + "pkg" + FS + "A.html", |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
63 |
"<link rel=\"stylesheet\" type=\"text/css\" " + |
cfadc977ca75
6851834: Javadoc doclet needs a structured approach to generate the output HTML.
bpatel
parents:
5520
diff
changeset
|
64 |
"href=\"../stylesheet.css\" title=\"Style\">"} |
10 | 65 |
}; |
9597
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
66 |
private static final String[][] NEGATED_TEST = { |
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
67 |
{BUG_ID + FS + "stylesheet.css", |
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
68 |
"* {" + NL + " margin:0;" + NL + " padding:0;" + NL + "}"} |
d9c8a0010a9a
7028815: Missing styles for some bulleted items in the new stylesheet
bpatel
parents:
7681
diff
changeset
|
69 |
}; |
10 | 70 |
|
71 |
/** |
|
72 |
* The entry point of the test. |
|
73 |
* @param args the array of command line arguments. |
|
74 |
*/ |
|
75 |
public static void main(String[] args) { |
|
76 |
TestStylesheet tester = new TestStylesheet(); |
|
77 |
run(tester, ARGS, TEST, NEGATED_TEST); |
|
78 |
tester.printSummary(); |
|
79 |
} |
|
80 |
||
81 |
/** |
|
82 |
* {@inheritDoc} |
|
83 |
*/ |
|
84 |
public String getBugId() { |
|
85 |
return BUG_ID; |
|
86 |
} |
|
87 |
||
88 |
/** |
|
89 |
* {@inheritDoc} |
|
90 |
*/ |
|
91 |
public String getBugName() { |
|
92 |
return getClass().getName(); |
|
93 |
} |
|
94 |
} |