test/com/sun/javadoc/testStylesheet/TestStylesheet.java

Tue, 25 May 2010 15:54:51 -0700

author
ohair
date
Tue, 25 May 2010 15:54:51 -0700
changeset 554
9d9f26857129
parent 1
9a66ca7c79fa
child 766
90af8d87741f
permissions
-rw-r--r--

6943119: Rebrand source copyright notices
Reviewed-by: darcy

     1 /*
     2  * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
     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  *
    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.
    22  */
    24 /*
    25  * @test
    26  * @bug      4494033
    27  * @summary  Run tests on doclet stylesheet.
    28  * @author   jamieh
    29  * @library  ../lib/
    30  * @build    JavadocTester
    31  * @build    TestStylesheet
    32  * @run main TestStylesheet
    33  */
    35 public class TestStylesheet extends JavadocTester {
    37     //Test information.
    38     private static final String BUG_ID = "4494033";
    40     //Javadoc arguments.
    41     private static final String[] ARGS = new String[] {
    42         "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg"
    43     };
    45     //Input for string search tests.
    46     private static final String[][] TEST = {
    47         {BUG_ID + FS + "stylesheet.css",
    48                 "body { background-color: #FFFFFF; color:#000000 }"},
    49         {BUG_ID + FS + "stylesheet.css",
    50                 ".TableHeadingColor     { background: #CCCCFF; color:#000000 }"},
    51         {BUG_ID + FS + "stylesheet.css",
    52                 ".TableSubHeadingColor  { background: #EEEEFF; color:#000000 }"},
    53         {BUG_ID + FS + "stylesheet.css",
    54                 ".TableRowColor         { background: #FFFFFF; color:#000000 }"},
    55         {BUG_ID + FS + "stylesheet.css",
    56                 ".FrameTitleFont   { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 }"},
    57         {BUG_ID + FS + "stylesheet.css",
    58                 ".FrameHeadingFont { font-size:  90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }"},
    59         {BUG_ID + FS + "stylesheet.css",
    60                 ".FrameItemFont    { font-size:  90%; font-family: Helvetica, Arial, sans-serif; color:#000000 }"},
    61         {BUG_ID + FS + "stylesheet.css",
    62                 ".NavBarCell1    { background-color:#EEEEFF; color:#000000}"},
    63         {BUG_ID + FS + "stylesheet.css",
    64                 ".NavBarCell1Rev { background-color:#00008B; color:#FFFFFF}"},
    65         {BUG_ID + FS + "stylesheet.css",
    66                 ".NavBarFont1    { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;}"},
    67         {BUG_ID + FS + "stylesheet.css",
    68                 ".NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;}"},
    69         {BUG_ID + FS + "stylesheet.css",
    70                 ".NavBarCell2    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}"},
    71         {BUG_ID + FS + "stylesheet.css",
    72                 ".NavBarCell3    { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000}"},
    74     };
    75     private static final String[][] NEGATED_TEST = NO_TEST;
    77     /**
    78      * The entry point of the test.
    79      * @param args the array of command line arguments.
    80      */
    81     public static void main(String[] args) {
    82         TestStylesheet tester = new TestStylesheet();
    83         run(tester, ARGS, TEST, NEGATED_TEST);
    84         tester.printSummary();
    85     }
    87     /**
    88      * {@inheritDoc}
    89      */
    90     public String getBugId() {
    91         return BUG_ID;
    92     }
    94     /**
    95      * {@inheritDoc}
    96      */
    97     public String getBugName() {
    98         return getClass().getName();
    99     }
   100 }

mercurial