1 /* |
1 /* |
2 * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
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 |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
21 * questions. |
21 * questions. |
22 */ |
22 */ |
23 |
23 |
24 /* |
24 /* |
25 * @test |
25 * @test |
26 * @bug 8008164 8169819 8183037 |
26 * @bug 8008164 8169819 8183037 8182765 |
27 * @summary Test styles on HTML tables generated by javadoc. |
27 * @summary Test styles on HTML tables generated by javadoc. |
28 * @author Bhavesh Patel |
28 * @author Bhavesh Patel |
29 * @library ../lib |
29 * @library ../lib |
30 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
30 * @modules jdk.javadoc/jdk.javadoc.internal.tool |
31 * @build JavadocTester |
31 * @build JavadocTester |
40 } |
40 } |
41 |
41 |
42 @Test |
42 @Test |
43 void test() { |
43 void test() { |
44 javadoc("-d", "out", |
44 javadoc("-d", "out", |
|
45 "-sourcepath", testSrc, |
|
46 "-use", |
|
47 "pkg1", "pkg2"); |
|
48 checkExit(Exit.ERROR); |
|
49 checkOutput(Output.OUT, true, |
|
50 "attribute not supported in HTML5: summary", |
|
51 "attribute border for table only accepts \"\" or \"1\", use CSS instead: BORDER", |
|
52 "attribute not supported in HTML5: cellpadding", |
|
53 "attribute not supported in HTML5: cellspacing", |
|
54 "attribute not supported in HTML5: align"); |
|
55 |
|
56 checkOutput("pkg1/TestTable.html", true, |
|
57 "<table summary=\"Summary\" border cellpadding=3 cellspacing=1>", |
|
58 "<table class=\"memberSummary\">", |
|
59 "<table class=\"memberSummary\">", |
|
60 "<table class=\"memberSummary\">"); |
|
61 |
|
62 checkOutput("pkg1/package-summary.html", true, |
|
63 "<table class=\"typeSummary\">"); |
|
64 |
|
65 checkOutput("pkg1/class-use/TestTable.html", true, |
|
66 "<table class=\"useSummary\">"); |
|
67 |
|
68 checkOutput("overview-summary.html", true, |
|
69 "<table class=\"overviewSummary\">"); |
|
70 |
|
71 checkOutput("deprecated-list.html", true, |
|
72 "<table class=\"deprecatedSummary\">"); |
|
73 |
|
74 checkOutput("constant-values.html", true, |
|
75 "<table class=\"constantsSummary\">"); |
|
76 } |
|
77 |
|
78 @Test |
|
79 void test_html4() { |
|
80 javadoc("-d", "out-html4", |
|
81 "-html4", |
45 "-sourcepath", testSrc, |
82 "-sourcepath", testSrc, |
46 "-use", |
83 "-use", |
47 "pkg1", "pkg2"); |
84 "pkg1", "pkg2"); |
48 checkExit(Exit.OK); |
85 checkExit(Exit.OK); |
49 |
86 |