langtools/test/com/sun/javadoc/testProfiles/TestProfilesConfiguration.java
changeset 24072 e7549dcbc4af
parent 24065 fc4022e50129
child 24399 af1a0220d0fa
equal deleted inserted replaced
24071:b0845717434e 24072:e7549dcbc4af
    31  * @run main TestProfilesConfiguration
    31  * @run main TestProfilesConfiguration
    32  */
    32  */
    33 public class TestProfilesConfiguration extends JavadocTester {
    33 public class TestProfilesConfiguration extends JavadocTester {
    34 
    34 
    35     //Test information.
    35     //Test information.
    36     private static final String BUG_ID = "8006124-8009684";
    36     private static final String PROFILE_CONFIGURATION_OUTPUT_DIR = OUTPUT_DIR + "-3";
    37     private static final String PROFILE_CONFIGURATION_BUG_ID = BUG_ID + "-3";
    37     private static final String NODEPR_NOPKGS_OUTPUT_DIR = OUTPUT_DIR + "-4";
    38     private static final String NODEPR_NOPKGS_BUG_ID = BUG_ID + "-4";
       
    39     //Javadoc arguments.
    38     //Javadoc arguments.
    40     private static final String[] ARGS3 = new String[]{
    39     private static final String[] ARGS3 = new String[]{
    41         "-d", PROFILE_CONFIGURATION_BUG_ID, "-sourcepath", SRC_DIR,
    40         "-d", PROFILE_CONFIGURATION_OUTPUT_DIR, "-sourcepath", SRC_DIR,
    42         "-nocomment", "-keywords", "-Xprofilespath", SRC_DIR +
    41         "-nocomment", "-keywords", "-Xprofilespath", SRC_DIR +
    43         "/profile-rtjar-includes.txt", "-doctitle", "Simple doctitle",
    42         "/profile-rtjar-includes.txt", "-doctitle", "Simple doctitle",
    44         "-use", "pkg3", "pkg1", "pkg2", "pkg4",
    43         "-use", "pkg3", "pkg1", "pkg2", "pkg4",
    45         "pkg5", "-packagesheader", "Simple packages header","pkgDeprecated"
    44         "pkg5", "-packagesheader", "Simple packages header","pkgDeprecated"
    46     };
    45     };
    47     private static final String[] ARGS4 = new String[]{
    46     private static final String[] ARGS4 = new String[]{
    48         "-d", NODEPR_NOPKGS_BUG_ID, "-sourcepath", SRC_DIR, "-nocomment",
    47         "-d", NODEPR_NOPKGS_OUTPUT_DIR, "-sourcepath", SRC_DIR, "-nocomment",
    49         "-nodeprecated", "-keywords", "-Xprofilespath", SRC_DIR +
    48         "-nodeprecated", "-keywords", "-Xprofilespath", SRC_DIR +
    50         "/profile-rtjar-includes-nopkgs.txt", "-doctitle", "Simple doctitle",
    49         "/profile-rtjar-includes-nopkgs.txt", "-doctitle", "Simple doctitle",
    51         "-use", "-packagesheader", "Simple packages header",
    50         "-use", "-packagesheader", "Simple packages header",
    52         "pkg1", "pkg2", "pkg3", "pkg4", "pkg5", "pkgDeprecated"
    51         "pkg1", "pkg2", "pkg3", "pkg4", "pkg5", "pkgDeprecated"
    53     };
    52     };
    54     private static final String[][] NODEPR_NOPKGS_TEST = {
    53     private static final String[][] NODEPR_NOPKGS_TEST = {
    55         {NODEPR_NOPKGS_BUG_ID + "/overview-summary.html",
    54         { "overview-summary.html",
    56             "<ul>\n" +
    55             "<ul>\n" +
    57             "<li><a href=\"compact2-summary.html\" target=\"classFrame\">" +
    56             "<li><a href=\"compact2-summary.html\" target=\"classFrame\">" +
    58             "compact2</a></li>\n" +
    57             "compact2</a></li>\n" +
    59             "<li><a href=\"compact3-summary.html\" target=\"" +
    58             "<li><a href=\"compact3-summary.html\" target=\"" +
    60             "classFrame\">compact3</a></li>\n" +
    59             "classFrame\">compact3</a></li>\n" +
    61             "</ul>"
    60             "</ul>"
    62         },
    61         },
    63         {NODEPR_NOPKGS_BUG_ID + "/profile-overview-frame.html",
    62         { "profile-overview-frame.html",
    64             "<ul title=\"Profiles\">\n" +
    63             "<ul title=\"Profiles\">\n" +
    65             "<li><a href=\"compact2-frame.html\" target=\"packageListFrame\">" +
    64             "<li><a href=\"compact2-frame.html\" target=\"packageListFrame\">" +
    66             "compact2</a></li>\n" +
    65             "compact2</a></li>\n" +
    67             "<li><a href=\"compact3-frame.html\" target=\"" +
    66             "<li><a href=\"compact3-frame.html\" target=\"" +
    68             "packageListFrame\">compact3</a></li>\n" +
    67             "packageListFrame\">compact3</a></li>\n" +
    69             "</ul>"
    68             "</ul>"
    70         }
    69         }
    71     };
    70     };
    72     private static final String[][] NODEPR_NOPKGS_NEGATED_TEST = {
    71     private static final String[][] NODEPR_NOPKGS_NEGATED_TEST = {
    73         {NODEPR_NOPKGS_BUG_ID + "/overview-summary.html",
    72         { "overview-summary.html",
    74             "compact1"
    73             "compact1"
    75         }
    74         }
    76     };
    75     };
    77 
    76 
    78     private static final String[][] PROFILES_CONFIGURATION_TEST = {
    77     private static final String[][] PROFILES_CONFIGURATION_TEST = {
    79         //-use option test string fo profile view page
    78         //-use option test string fo profile view page
    80         {PROFILE_CONFIGURATION_BUG_ID + "/compact1-summary.html","<li>Use</li>"
    79         { "compact1-summary.html","<li>Use</li>"
    81         },
    80         },
    82         //-doctitle option test string
    81         //-doctitle option test string
    83         {PROFILE_CONFIGURATION_BUG_ID + "/overview-summary.html",
    82         { "overview-summary.html",
    84             "<div class=\"header\">\n" +
    83             "<div class=\"header\">\n" +
    85             "<h1 class=\"title\">Simple doctitle</h1>"
    84             "<h1 class=\"title\">Simple doctitle</h1>"
    86         },
    85         },
    87         //-packagesheader option test string fo profiles
    86         //-packagesheader option test string fo profiles
    88         {PROFILE_CONFIGURATION_BUG_ID + "/profile-overview-frame.html",
    87         { "profile-overview-frame.html",
    89             "<h1 title=\"Simple packages header\" class=\"bar\">Simple packages header</h1>"
    88             "<h1 title=\"Simple packages header\" class=\"bar\">Simple packages header</h1>"
    90         },
    89         },
    91         //-keywords option test string for profiles
    90         //-keywords option test string for profiles
    92         {PROFILE_CONFIGURATION_BUG_ID + "/compact1-summary.html",
    91         { "compact1-summary.html",
    93             "<meta name=\"keywords\" content=\"compact1 profile\">"
    92             "<meta name=\"keywords\" content=\"compact1 profile\">"
    94         },
    93         },
    95         //Deprecated information on a package
    94         //Deprecated information on a package
    96         {PROFILE_CONFIGURATION_BUG_ID + "/compact1-summary.html",
    95         { "compact1-summary.html",
    97             "<h3><a href=\"pkgDeprecated/compact1-package-summary.html\" target=\"" +
    96             "<h3><a href=\"pkgDeprecated/compact1-package-summary.html\" target=\"" +
    98             "classFrame\">pkgDeprecated</a></h3>\n" +
    97             "classFrame\">pkgDeprecated</a></h3>\n" +
    99             "<div class=\"deprecatedContent\">" +
    98             "<div class=\"deprecatedContent\">" +
   100             "<span class=\"deprecatedLabel\">Deprecated.</span></div>"
    99             "<span class=\"deprecatedLabel\">Deprecated.</span></div>"
   101         }
   100         }
   102     };
   101     };
   103     private static final String[][] PROFILES_CONFIGURATION_NEGATED_TEST = {
   102     private static final String[][] PROFILES_CONFIGURATION_NEGATED_TEST = {
   104         //-nocomments option test string
   103         //-nocomments option test string
   105         {PROFILE_CONFIGURATION_BUG_ID + "/compact1-summary.html",
   104         { "compact1-summary.html",
   106             "<div class=\"block\"><i>Class1Pkg2.</i></div>"
   105             "<div class=\"block\"><i>Class1Pkg2.</i></div>"
   107         }
   106         }
   108     };
   107     };
   109 
   108 
   110     /**
   109     /**
   118         PROFILES_CONFIGURATION_NEGATED_TEST);
   117         PROFILES_CONFIGURATION_NEGATED_TEST);
   119         tester.run(ARGS4, NODEPR_NOPKGS_TEST,
   118         tester.run(ARGS4, NODEPR_NOPKGS_TEST,
   120         NODEPR_NOPKGS_NEGATED_TEST);
   119         NODEPR_NOPKGS_NEGATED_TEST);
   121         tester.printSummary();
   120         tester.printSummary();
   122     }
   121     }
   123 
       
   124     /**
       
   125      * {@inheritDoc}
       
   126      */
       
   127     public String getBugId() {
       
   128         return BUG_ID;
       
   129     }
       
   130 
       
   131     /**
       
   132      * {@inheritDoc}
       
   133      */
       
   134     public String getBugName() {
       
   135         return getClass().getName();
       
   136     }
       
   137 }
   122 }