test/com/sun/javadoc/testProfiles/TestProfiles.java

changeset 1999
7993cfab8610
parent 1993
240f424cc0d5
child 2036
8df12c315ea3
     1.1 --- a/test/com/sun/javadoc/testProfiles/TestProfiles.java	Fri Aug 30 16:38:54 2013 -0700
     1.2 +++ b/test/com/sun/javadoc/testProfiles/TestProfiles.java	Fri Aug 30 17:36:47 2013 -0700
     1.3 @@ -25,7 +25,7 @@
     1.4   * @test
     1.5   * @bug      8006124 8009684 8016921 8023700
     1.6   * @summary  Test javadoc support for profiles.
     1.7 - * @author   Bhavesh Patel
     1.8 + * @author   Bhavesh Patel, Evgeniya Stepanova
     1.9   * @library  ../lib/
    1.10   * @build    JavadocTester TestProfiles
    1.11   * @run main TestProfiles
    1.12 @@ -38,8 +38,9 @@
    1.13      private static final String PACKAGE_BUG_ID = BUG_ID + "-2";
    1.14      //Javadoc arguments.
    1.15      private static final String[] ARGS1 = new String[]{
    1.16 -        "-d", PROFILE_BUG_ID, "-sourcepath", SRC_DIR, "-Xprofilespath", SRC_DIR + FS
    1.17 -        + "profile-rtjar-includes.txt", "pkg1", "pkg2", "pkg3", "pkg4", "pkg5"
    1.18 +        "-d", PROFILE_BUG_ID, "-sourcepath", SRC_DIR, "-Xprofilespath",
    1.19 +         SRC_DIR + FS + "profile-rtjar-includes.txt", "pkg1", "pkg2",
    1.20 +         "pkg3", "pkg4", "pkg5", "pkgDeprecated"
    1.21      };
    1.22      private static final String[] ARGS2 = new String[]{
    1.23          "-d", PACKAGE_BUG_ID, "-sourcepath", SRC_DIR, "pkg1", "pkg2", "pkg3", "pkg4", "pkg5"
    1.24 @@ -113,6 +114,49 @@
    1.25              "target=\"classFrame\">compact2</a></li>" + NL + "<li><a href=\"" +
    1.26              "compact3-summary.html\" target=\"classFrame\">compact3</a></li>" + NL +
    1.27              "</ul>"
    1.28 +        },
    1.29 +        //Test deprecated class in profiles
    1.30 +        {PROFILE_BUG_ID + FS + "compact1-summary.html","<td class=\"colFirst\">"
    1.31 +            + "<a href=\"pkg2/Class1Pkg2.html\" title=\"class in pkg2\">Class1Pkg2</a></td>"
    1.32 +            + NL + "<td class=\"colLast\">Deprecated"
    1.33 +        },
    1.34 +        {PROFILE_BUG_ID + FS + "deprecated-list.html","<td class=\"colOne\">"
    1.35 +            + "<a href=\"pkg2/Class1Pkg2.html\" title=\"class in pkg2\">pkg2.Class1Pkg2</a>"
    1.36 +            + NL +"<div class=\"block\"><span class=\"italic\">Class1Pkg2. This class is deprecated</span></div>"
    1.37 +        },
    1.38 +        //Test deprecated package in profile
    1.39 +        {PROFILE_BUG_ID + FS + "deprecated-list.html","<td class=\"colOne\">"
    1.40 +            + "<a href=\"pkgDeprecated/package-summary.html\">pkgDeprecated</a>"
    1.41 +            + NL +"<div class=\"block\"><span class=\"italic\">This package is <b>Deprecated</b>."
    1.42 +            + " Use pkg1.</span></div>"
    1.43 +        },
    1.44 +        {PROFILE_BUG_ID + FS + "pkgDeprecated" + FS + "package-summary.html",
    1.45 +            "<div class=\"deprecatedContent\"><span class=\"strong\">Deprecated.</span>"
    1.46 +            + NL + "<div class=\"block\"><span class=\"italic\">This package is <b>Deprecated</b>."
    1.47 +            + " Use pkg1.</span></div>"
    1.48 +        },
    1.49 +        // need to add teststring when JDK-8015496 will be fixed
    1.50 +        //Test exception in profiles
    1.51 +        {PROFILE_BUG_ID + FS + "compact1-summary.html","<table class=\"packageSummary\" "
    1.52 +            + "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
    1.53 +            + "summary=\"Exception Summary table, listing exceptions, and an explanation\">"
    1.54 +            + NL + "<caption><span>Exception Summary</span><span class=\"tabEnd\">"
    1.55 +            + "&nbsp;</span></caption>" + NL + "<tr>" + NL + "<th class=\"colFirst\" "
    1.56 +            + "scope=\"col\">Exception</th>" + NL + "<th class=\"colLast\" scope=\"col\">"
    1.57 +            + "Description</th>" + NL + "</tr>" + NL + "<tbody>" + NL + "<tr class=\"altColor\">"
    1.58 +            + NL + "<td class=\"colFirst\"><a href=\"pkg2/ClassException.html\""
    1.59 +            + " title=\"class in pkg2\">ClassException</a></td>"
    1.60 +        },
    1.61 +        //Test errors in profiles
    1.62 +        {PROFILE_BUG_ID + FS + "compact1-summary.html",
    1.63 +            "<table class=\"packageSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" "
    1.64 +            + "summary=\"Error Summary table, listing errors, and an explanation\">"
    1.65 +            + NL + "<caption><span>Error Summary</span><span class=\"tabEnd\">&nbsp;"
    1.66 +            + "</span></caption>" + NL + "<tr>" + NL + "<th class=\"colFirst\""
    1.67 +            + " scope=\"col\">Error</th>" + NL + "<th class=\"colLast\" "
    1.68 +            + "scope=\"col\">Description</th>" + NL + "</tr>" + NL + "<tbody>"
    1.69 +            + NL + "<tr class=\"altColor\">" + NL + "<td class=\"colFirst\">"
    1.70 +            + "<a href=\"pkg2/ClassError.html\" title=\"class in pkg2\">ClassError</a></td>"
    1.71          }
    1.72      };
    1.73      private static final String[][] PROFILES_NEGATED_TEST = {
    1.74 @@ -125,6 +169,8 @@
    1.75          {PROFILE_BUG_ID + FS + "pkg4" + FS + "compact2-package-frame.html",
    1.76              "<li><a href=\"Anno1Pkg4.html\" title=\"annotation in pkg4\" "
    1.77              + "target=\"classFrame\">Anno1Pkg4</a></li>"
    1.78 +        },
    1.79 +        {PROFILE_BUG_ID + FS + "compact1-summary.html","<li>Use</li>"
    1.80          }
    1.81      };
    1.82      private static final String[][] PACKAGES_TEST = {

mercurial