Fri, 04 Oct 2013 13:32:30 -0700
8008164: Invisible table captions in javadoc-generated html
Reviewed-by: jjg
bpatel@1417 | 1 | /* |
bpatel@2036 | 2 | * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. |
bpatel@1417 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
bpatel@1417 | 4 | * |
bpatel@1417 | 5 | * This code is free software; you can redistribute it and/or modify it |
bpatel@1417 | 6 | * under the terms of the GNU General Public License version 2 only, as |
bpatel@1417 | 7 | * published by the Free Software Foundation. |
bpatel@1417 | 8 | * |
bpatel@1417 | 9 | * This code is distributed in the hope that it will be useful, but WITHOUT |
bpatel@1417 | 10 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
bpatel@1417 | 11 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
bpatel@1417 | 12 | * version 2 for more details (a copy is included in the LICENSE file that |
bpatel@1417 | 13 | * accompanied this code). |
bpatel@1417 | 14 | * |
bpatel@1417 | 15 | * You should have received a copy of the GNU General Public License version |
bpatel@1417 | 16 | * 2 along with this work; if not, write to the Free Software Foundation, |
bpatel@1417 | 17 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
bpatel@1417 | 18 | * |
bpatel@1417 | 19 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
bpatel@1417 | 20 | * or visit www.oracle.com if you need additional information or have any |
bpatel@1417 | 21 | * questions. |
bpatel@1417 | 22 | */ |
bpatel@1417 | 23 | |
bpatel@1417 | 24 | /* |
bpatel@1417 | 25 | * @test |
bpatel@2036 | 26 | * @bug 8002304 8024096 |
bpatel@1417 | 27 | * @summary Test for various method types in the method summary table |
bpatel@1417 | 28 | * @author Bhavesh Patel |
bpatel@1417 | 29 | * @library ../lib/ |
bpatel@1417 | 30 | * @build JavadocTester TestMethodTypes |
bpatel@1417 | 31 | * @run main TestMethodTypes |
bpatel@1417 | 32 | */ |
bpatel@1417 | 33 | |
bpatel@1417 | 34 | public class TestMethodTypes extends JavadocTester { |
bpatel@1417 | 35 | |
bpatel@1417 | 36 | //Test information. |
bpatel@1417 | 37 | private static final String BUG_ID = "8002304"; |
bpatel@1417 | 38 | |
bpatel@1417 | 39 | //Javadoc arguments. |
bpatel@1417 | 40 | private static final String[] ARGS = new String[] { |
bpatel@1417 | 41 | "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1" |
bpatel@1417 | 42 | }; |
bpatel@1417 | 43 | |
bpatel@1417 | 44 | private static final String[][] TEST = { |
bpatel@1417 | 45 | {BUG_ID + FS + "pkg1" + FS + "A.html", |
bpatel@1417 | 46 | "var methods = {" |
bpatel@1417 | 47 | }, |
bpatel@1417 | 48 | |
bpatel@1417 | 49 | {BUG_ID + FS + "pkg1" + FS + "A.html", |
bpatel@1417 | 50 | "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " + |
bpatel@1417 | 51 | "Methods</span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 52 | "<span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:show(1);\">" + |
bpatel@1417 | 53 | "Static Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 54 | "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" + |
bpatel@1417 | 55 | "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 56 | "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" + |
bpatel@1417 | 57 | "Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1468 | 58 | "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" + |
bpatel@1417 | 59 | "Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 60 | "</caption>" |
bpatel@1417 | 61 | }, |
bpatel@1417 | 62 | |
bpatel@1417 | 63 | {BUG_ID + FS + "pkg1" + FS + "A.html", |
bpatel@1417 | 64 | "<tr id=\"i0\" class=\"altColor\">" |
bpatel@1417 | 65 | }, |
bpatel@1417 | 66 | |
bpatel@1417 | 67 | {BUG_ID + FS + "pkg1" + FS + "B.html", |
bpatel@1417 | 68 | "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " + |
bpatel@1417 | 69 | "Methods</span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 70 | "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" + |
bpatel@1417 | 71 | "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 72 | "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" + |
bpatel@1417 | 73 | "Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 74 | "</caption>" |
bpatel@1417 | 75 | }, |
bpatel@1417 | 76 | |
bpatel@1417 | 77 | {BUG_ID + FS + "pkg1" + FS + "D.html", |
bpatel@1417 | 78 | "var methods = {" |
bpatel@1417 | 79 | }, |
bpatel@1417 | 80 | |
bpatel@1417 | 81 | {BUG_ID + FS + "pkg1" + FS + "D.html", |
bpatel@1417 | 82 | "<caption><span id=\"t0\" class=\"activeTableTab\"><span>All " + |
bpatel@1417 | 83 | "Methods</span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 84 | "<span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">" + |
bpatel@1417 | 85 | "Instance Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 86 | "<span id=\"t3\" class=\"tableTab\"><span><a href=\"javascript:show(4);\">" + |
bpatel@1417 | 87 | "Abstract Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 88 | "<span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">" + |
bpatel@1417 | 89 | "Concrete Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1468 | 90 | "<span id=\"t6\" class=\"tableTab\"><span><a href=\"javascript:show(32);\">" + |
bpatel@1417 | 91 | "Deprecated Methods</a></span><span class=\"tabEnd\"> </span></span>" + |
bpatel@1417 | 92 | "</caption>" |
bpatel@1417 | 93 | }, |
bpatel@1417 | 94 | |
bpatel@1417 | 95 | {BUG_ID + FS + "pkg1" + FS + "D.html", |
bpatel@1417 | 96 | "<tr id=\"i0\" class=\"altColor\">" |
bpatel@1417 | 97 | }, |
bpatel@1417 | 98 | }; |
bpatel@1417 | 99 | private static final String[][] NEGATED_TEST = { |
bpatel@1417 | 100 | {BUG_ID + FS + "pkg1" + FS + "A.html", |
bpatel@1417 | 101 | "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" + |
bpatel@1417 | 102 | "</caption>" |
bpatel@1417 | 103 | }, |
bpatel@1417 | 104 | |
bpatel@1417 | 105 | {BUG_ID + FS + "pkg1" + FS + "B.html", |
bpatel@1417 | 106 | "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" + |
bpatel@1417 | 107 | "</caption>" |
bpatel@1417 | 108 | }, |
bpatel@1417 | 109 | |
bpatel@2036 | 110 | {BUG_ID + FS + "pkg1" + FS + "D.html", |
bpatel@1417 | 111 | "<caption><span>Methods</span><span class=\"tabEnd\"> </span>" + |
bpatel@1417 | 112 | "</caption>" |
bpatel@1417 | 113 | }, |
bpatel@1417 | 114 | }; |
bpatel@1417 | 115 | |
bpatel@1417 | 116 | /** |
bpatel@1417 | 117 | * The entry point of the test. |
bpatel@1417 | 118 | * @param args the array of command line arguments. |
bpatel@1417 | 119 | */ |
bpatel@1417 | 120 | public static void main(String[] args) { |
bpatel@1417 | 121 | TestMethodTypes tester = new TestMethodTypes(); |
bpatel@1417 | 122 | run(tester, ARGS, TEST, NEGATED_TEST); |
bpatel@1417 | 123 | tester.printSummary(); |
bpatel@1417 | 124 | } |
bpatel@1417 | 125 | |
bpatel@1417 | 126 | /** |
bpatel@1417 | 127 | * {@inheritDoc} |
bpatel@1417 | 128 | */ |
bpatel@1417 | 129 | public String getBugId() { |
bpatel@1417 | 130 | return BUG_ID; |
bpatel@1417 | 131 | } |
bpatel@1417 | 132 | |
bpatel@1417 | 133 | /** |
bpatel@1417 | 134 | * {@inheritDoc} |
bpatel@1417 | 135 | */ |
bpatel@1417 | 136 | public String getBugName() { |
bpatel@1417 | 137 | return getClass().getName(); |
bpatel@1417 | 138 | } |
bpatel@1417 | 139 | } |