21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 4494033 7028815 7052425 |
26 * @bug 4494033 7028815 7052425 8007338 |
27 * @summary Run tests on doclet stylesheet. |
27 * @summary Run tests on doclet stylesheet. |
28 * @author jamieh |
28 * @author jamieh |
29 * @library ../lib/ |
29 * @library ../lib/ |
30 * @build JavadocTester TestStylesheet |
30 * @build JavadocTester TestStylesheet |
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. |
36 //Test information. |
37 private static final String BUG_ID = "4494033-7028815-7052425"; |
37 private static final String BUG_ID = "4494033-7028815-7052425-8007338"; |
38 |
38 |
39 //Javadoc arguments. |
39 //Javadoc arguments. |
40 private static final String[] ARGS = new String[] { |
40 private static final String[] ARGS = new String[] { |
41 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" |
41 "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg" |
42 }; |
42 }; |
43 |
43 |
44 //Input for string search tests. |
44 //Input for string search tests. |
45 private static final String[][] TEST = { |
45 private static final String[][] TEST = { |
46 {BUG_ID + FS + "stylesheet.css", |
46 {BUG_ID + FS + "stylesheet.css", |
47 "/* Javadoc style sheet */"}, |
47 "/* Javadoc style sheet */"}, |
48 {BUG_ID + FS + "stylesheet.css", |
48 {BUG_ID + FS + "stylesheet.css", |
49 "/*" + NL + "Overall document style" + NL + "*/"}, |
49 "/*" + NL + "Overall document style" + NL + "*/"}, |
50 {BUG_ID + FS + "stylesheet.css", |
50 {BUG_ID + FS + "stylesheet.css", |
51 "/*" + NL + "Heading styles" + NL + "*/"}, |
51 "/*" + NL + "Heading styles" + NL + "*/"}, |
52 {BUG_ID + FS + "stylesheet.css", |
52 {BUG_ID + FS + "stylesheet.css", |
53 "/*" + NL + "Navigation bar styles" + NL + "*/"}, |
53 "/*" + NL + "Navigation bar styles" + NL + "*/"}, |
54 {BUG_ID + FS + "stylesheet.css", |
54 {BUG_ID + FS + "stylesheet.css", |
55 "body {" + NL + " background-color:#ffffff;" + NL + |
55 "body {" + NL + " background-color:#ffffff;" + NL + |
56 " color:#353833;" + NL + |
56 " color:#353833;" + NL + |
57 " font-family:Arial, Helvetica, sans-serif;" + NL + |
57 " font-family:Arial, Helvetica, sans-serif;" + NL + |
58 " font-size:76%;" + NL + " margin:0;" + NL + "}"}, |
58 " font-size:76%;" + NL + " margin:0;" + NL + "}"}, |
59 {BUG_ID + FS + "stylesheet.css", |
59 {BUG_ID + FS + "stylesheet.css", |
60 "ul {" + NL + " list-style-type:disc;" + NL + "}"}, |
60 "ul {" + NL + " list-style-type:disc;" + NL + "}"}, |
|
61 {BUG_ID + FS + "stylesheet.css", |
|
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 "}"}, |
61 // Test whether a link to the stylesheet file is inserted properly |
77 // Test whether a link to the stylesheet file is inserted properly |
62 // in the class documentation. |
78 // in the class documentation. |
63 {BUG_ID + FS + "pkg" + FS + "A.html", |
79 {BUG_ID + FS + "pkg" + FS + "A.html", |
64 "<link rel=\"stylesheet\" type=\"text/css\" " + |
80 "<link rel=\"stylesheet\" type=\"text/css\" " + |
65 "href=\"../stylesheet.css\" title=\"Style\">"} |
81 "href=\"../stylesheet.css\" title=\"Style\">"} |
66 }; |
82 }; |
67 private static final String[][] NEGATED_TEST = { |
83 private static final String[][] NEGATED_TEST = { |
68 {BUG_ID + FS + "stylesheet.css", |
84 {BUG_ID + FS + "stylesheet.css", |
69 "* {" + NL + " margin:0;" + NL + " padding:0;" + NL + "}"} |
85 "* {" + NL + " margin:0;" + NL + " padding:0;" + NL + "}"} |
70 }; |
86 }; |
71 |
87 |
72 /** |
88 /** |
73 * The entry point of the test. |
89 * The entry point of the test. |
74 * @param args the array of command line arguments. |
90 * @param args the array of command line arguments. |