31 * @run main TestProfiles |
31 * @run main TestProfiles |
32 */ |
32 */ |
33 public class TestProfiles extends JavadocTester { |
33 public class TestProfiles extends JavadocTester { |
34 |
34 |
35 //Test information. |
35 //Test information. |
36 private static final String BUG_ID = "8006124-8009684-8016921"; |
36 private static final String PROFILE_OUTPUT_DIR = OUTPUT_DIR + "-1"; |
37 private static final String PROFILE_BUG_ID = BUG_ID + "-1"; |
37 private static final String PACKAGE_OUTPUT_DIR = OUTPUT_DIR + "-2"; |
38 private static final String PACKAGE_BUG_ID = BUG_ID + "-2"; |
|
39 //Javadoc arguments. |
38 //Javadoc arguments. |
40 private static final String[] ARGS1 = new String[]{ |
39 private static final String[] ARGS1 = new String[]{ |
41 "-d", PROFILE_BUG_ID, "-sourcepath", SRC_DIR, "-Xprofilespath", |
40 "-d", PROFILE_OUTPUT_DIR, "-sourcepath", SRC_DIR, "-Xprofilespath", |
42 SRC_DIR + "/profile-rtjar-includes.txt", "pkg1", "pkg2", |
41 SRC_DIR + "/profile-rtjar-includes.txt", "pkg1", "pkg2", |
43 "pkg3", "pkg4", "pkg5", "pkgDeprecated" |
42 "pkg3", "pkg4", "pkg5", "pkgDeprecated" |
44 }; |
43 }; |
45 private static final String[] ARGS2 = new String[]{ |
44 private static final String[] ARGS2 = new String[]{ |
46 "-d", PACKAGE_BUG_ID, "-sourcepath", SRC_DIR, "pkg1", "pkg2", |
45 "-d", PACKAGE_OUTPUT_DIR, "-sourcepath", SRC_DIR, "pkg1", "pkg2", |
47 "pkg3", "pkg4", "pkg5" |
46 "pkg3", "pkg4", "pkg5" |
48 }; |
47 }; |
49 //Input for string tests for profiles. |
48 //Input for string tests for profiles. |
50 private static final String[][] PROFILES_TEST = { |
49 private static final String[][] PROFILES_TEST = { |
51 // Tests for profile-overview-frame.html listing all profiles. |
50 // Tests for profile-overview-frame.html listing all profiles. |
52 {PROFILE_BUG_ID + "/profile-overview-frame.html", |
51 { "profile-overview-frame.html", |
53 "<span><a href=\"overview-frame.html\" " |
52 "<span><a href=\"overview-frame.html\" " |
54 + "target=\"packageListFrame\">All Packages</a></span>" |
53 + "target=\"packageListFrame\">All Packages</a></span>" |
55 }, |
54 }, |
56 {PROFILE_BUG_ID + "/profile-overview-frame.html", |
55 { "profile-overview-frame.html", |
57 "<li><a href=\"compact1-frame.html\" target=\"packageListFrame\">" |
56 "<li><a href=\"compact1-frame.html\" target=\"packageListFrame\">" |
58 + "compact1</a></li>" |
57 + "compact1</a></li>" |
59 }, |
58 }, |
60 // Tests for profileName-frame.html listing all packages in a profile. |
59 // Tests for profileName-frame.html listing all packages in a profile. |
61 {PROFILE_BUG_ID + "/compact2-frame.html", |
60 { "compact2-frame.html", |
62 "<span><a href=\"overview-frame.html\" target=\"packageListFrame\">" |
61 "<span><a href=\"overview-frame.html\" target=\"packageListFrame\">" |
63 + "All Packages</a></span><span><a href=\"profile-overview-frame.html\" " |
62 + "All Packages</a></span><span><a href=\"profile-overview-frame.html\" " |
64 + "target=\"packageListFrame\">All Profiles</a></span>" |
63 + "target=\"packageListFrame\">All Profiles</a></span>" |
65 }, |
64 }, |
66 {PROFILE_BUG_ID + "/compact2-frame.html", |
65 { "compact2-frame.html", |
67 "<li><a href=\"pkg4/compact2-package-frame.html\" " |
66 "<li><a href=\"pkg4/compact2-package-frame.html\" " |
68 + "target=\"packageFrame\">pkg4</a></li>" |
67 + "target=\"packageFrame\">pkg4</a></li>" |
69 }, |
68 }, |
70 // Test for profileName-package-frame.html listing all types in a |
69 // Test for profileName-package-frame.html listing all types in a |
71 // package of a profile. |
70 // package of a profile. |
72 {PROFILE_BUG_ID + "/pkg2/compact2-package-frame.html", |
71 { "pkg2/compact2-package-frame.html", |
73 "<a href=\"../compact2-summary.html\" target=\"classFrame\">" |
72 "<a href=\"../compact2-summary.html\" target=\"classFrame\">" |
74 + "compact2</a> - <a href=\"../pkg2/compact2-package-summary.html\" " |
73 + "compact2</a> - <a href=\"../pkg2/compact2-package-summary.html\" " |
75 + "target=\"classFrame\">pkg2</a>" |
74 + "target=\"classFrame\">pkg2</a>" |
76 }, |
75 }, |
77 // Tests for profileName-summary.html listing the summary for a profile. |
76 // Tests for profileName-summary.html listing the summary for a profile. |
78 {PROFILE_BUG_ID + "/compact2-summary.html", |
77 { "compact2-summary.html", |
79 "<li><a href=\"compact1-summary.html\">Prev Profile</a></li>\n" |
78 "<li><a href=\"compact1-summary.html\">Prev Profile</a></li>\n" |
80 + "<li><a href=\"compact3-summary.html\">Next Profile</a></li>" |
79 + "<li><a href=\"compact3-summary.html\">Next Profile</a></li>" |
81 }, |
80 }, |
82 {PROFILE_BUG_ID + "/compact2-summary.html", |
81 { "compact2-summary.html", |
83 "<h1 title=\"Profile\" class=\"title\">Profile compact2</h1>" |
82 "<h1 title=\"Profile\" class=\"title\">Profile compact2</h1>" |
84 }, |
83 }, |
85 {PROFILE_BUG_ID + "/compact2-summary.html", |
84 { "compact2-summary.html", |
86 "<h3><a href=\"pkg2/compact2-package-summary.html\" " |
85 "<h3><a href=\"pkg2/compact2-package-summary.html\" " |
87 + "target=\"classFrame\">pkg2</a></h3>" |
86 + "target=\"classFrame\">pkg2</a></h3>" |
88 }, |
87 }, |
89 {PROFILE_BUG_ID + "/compact2-summary.html", |
88 { "compact2-summary.html", |
90 "<ul class=\"blockList\">\n" + |
89 "<ul class=\"blockList\">\n" + |
91 "<li class=\"blockList\">\n" |
90 "<li class=\"blockList\">\n" |
92 + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">" |
91 + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">" |
93 + "pkg2</a></h3>\n" + |
92 + "pkg2</a></h3>\n" + |
94 "<table class=\"typeSummary\" border=\"0\" " |
93 "<table class=\"typeSummary\" border=\"0\" " |
95 + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " |
94 + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " |
96 + "listing classes, and an explanation\">" |
95 + "listing classes, and an explanation\">" |
97 }, |
96 }, |
98 {PROFILE_BUG_ID + "/compact2-summary.html", |
97 { "compact2-summary.html", |
99 "<ul class=\"blockList\">\n" + |
98 "<ul class=\"blockList\">\n" + |
100 "<li class=\"blockList\">\n" |
99 "<li class=\"blockList\">\n" |
101 + "<h3><a href=\"pkg4/compact2-package-summary.html\" target=\"classFrame\">" |
100 + "<h3><a href=\"pkg4/compact2-package-summary.html\" target=\"classFrame\">" |
102 + "pkg4</a></h3>\n" + |
101 + "pkg4</a></h3>\n" + |
103 "<table class=\"typeSummary\" border=\"0\" " |
102 "<table class=\"typeSummary\" border=\"0\" " |
104 + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " |
103 + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " |
105 + "listing classes, and an explanation\">" |
104 + "listing classes, and an explanation\">" |
106 }, |
105 }, |
107 // Tests for profileName-package-summary.html listing the summary for a |
106 // Tests for profileName-package-summary.html listing the summary for a |
108 // package in a profile. |
107 // package in a profile. |
109 {PROFILE_BUG_ID + "/pkg5/compact3-package-summary.html", |
108 { "pkg5/compact3-package-summary.html", |
110 "<li><a href=\"../pkg4/compact3-package-summary.html\">Prev Package" |
109 "<li><a href=\"../pkg4/compact3-package-summary.html\">Prev Package" |
111 + "</a></li>" |
110 + "</a></li>" |
112 }, |
111 }, |
113 {PROFILE_BUG_ID + "/pkg5/compact3-package-summary.html", |
112 { "pkg5/compact3-package-summary.html", |
114 "<div class=\"subTitle\">compact3</div>" |
113 "<div class=\"subTitle\">compact3</div>" |
115 }, |
114 }, |
116 {PROFILE_BUG_ID + "/pkg5/compact3-package-summary.html", |
115 { "pkg5/compact3-package-summary.html", |
117 "<ul class=\"blockList\">\n" + |
116 "<ul class=\"blockList\">\n" + |
118 "<li class=\"blockList\">\n" |
117 "<li class=\"blockList\">\n" |
119 + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " |
118 + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " |
120 + "cellspacing=\"0\" summary=\"Interface Summary table, listing " |
119 + "cellspacing=\"0\" summary=\"Interface Summary table, listing " |
121 + "interfaces, and an explanation\">" |
120 + "interfaces, and an explanation\">" |
122 }, |
121 }, |
123 //Test for "overview-frame.html" showing the "All Profiles" link. |
122 //Test for "overview-frame.html" showing the "All Profiles" link. |
124 {PROFILE_BUG_ID + "/overview-frame.html", |
123 { "overview-frame.html", |
125 "<span><a href=\"profile-overview-frame.html\" " |
124 "<span><a href=\"profile-overview-frame.html\" " |
126 + "target=\"packageListFrame\">All Profiles</a></span>" |
125 + "target=\"packageListFrame\">All Profiles</a></span>" |
127 }, |
126 }, |
128 //Test for "className.html" showing the profile information for the type. |
127 //Test for "className.html" showing the profile information for the type. |
129 {PROFILE_BUG_ID + "/pkg2/Class1Pkg2.html", |
128 { "pkg2/Class1Pkg2.html", |
130 "<div class=\"subTitle\">compact1, compact2, compact3</div>" |
129 "<div class=\"subTitle\">compact1, compact2, compact3</div>" |
131 }, |
130 }, |
132 {PROFILE_BUG_ID + "/index.html", |
131 { "index.html", |
133 "<frame src=\"overview-frame.html\" name=\"packageListFrame\" " + |
132 "<frame src=\"overview-frame.html\" name=\"packageListFrame\" " + |
134 "title=\"All Packages\">" |
133 "title=\"All Packages\">" |
135 }, |
134 }, |
136 //Test for "overview-summary.html" showing the profile list. |
135 //Test for "overview-summary.html" showing the profile list. |
137 {PROFILE_BUG_ID + "/overview-summary.html", |
136 { "overview-summary.html", |
138 "<ul>\n" + |
137 "<ul>\n" + |
139 "<li><a href=\"compact1-summary.html\" target=\"classFrame\">" + |
138 "<li><a href=\"compact1-summary.html\" target=\"classFrame\">" + |
140 "compact1</a></li>\n" + |
139 "compact1</a></li>\n" + |
141 "<li><a href=\"compact2-summary.html\" " + |
140 "<li><a href=\"compact2-summary.html\" " + |
142 "target=\"classFrame\">compact2</a></li>\n" + |
141 "target=\"classFrame\">compact2</a></li>\n" + |
143 "<li><a href=\"" + |
142 "<li><a href=\"" + |
144 "compact3-summary.html\" target=\"classFrame\">compact3</a></li>\n" + |
143 "compact3-summary.html\" target=\"classFrame\">compact3</a></li>\n" + |
145 "</ul>" |
144 "</ul>" |
146 }, |
145 }, |
147 //Test deprecated class in profiles |
146 //Test deprecated class in profiles |
148 {PROFILE_BUG_ID + "/compact1-summary.html","<td class=\"colFirst\">" |
147 { "compact1-summary.html", |
149 + "<a href=\"pkg2/Class1Pkg2.html\" title=\"class in pkg2\">Class1Pkg2</a></td>\n" |
148 "<td class=\"colFirst\"><a href=\"pkg2/Class1Pkg2.html\" title=\"class in pkg2\">Class1Pkg2</a></td>\n" |
150 + "<td class=\"colLast\">Deprecated" |
149 + "<td class=\"colLast\">Deprecated" |
151 }, |
150 }, |
152 {PROFILE_BUG_ID + "/deprecated-list.html","<td class=\"colOne\">" |
151 { "deprecated-list.html", |
153 + "<a href=\"pkg2/Class1Pkg2.html\" title=\"class in pkg2\">pkg2.Class1Pkg2</a>\n" |
152 "<td class=\"colOne\"><a href=\"pkg2/Class1Pkg2.html\" title=\"class in pkg2\">pkg2.Class1Pkg2</a>\n" |
154 +"<div class=\"block\"><span class=\"deprecationComment\">Class1Pkg2. This class is deprecated</span></div>" |
153 +"<div class=\"block\"><span class=\"deprecationComment\">Class1Pkg2. This class is deprecated</span></div>" |
155 }, |
154 }, |
156 //Test deprecated package in profile |
155 //Test deprecated package in profile |
157 {PROFILE_BUG_ID + "/deprecated-list.html","<td class=\"colOne\">" |
156 { "deprecated-list.html", |
158 + "<a href=\"pkgDeprecated/package-summary.html\">pkgDeprecated</a>\n" |
157 "<td class=\"colOne\"><a href=\"pkgDeprecated/package-summary.html\">pkgDeprecated</a>\n" |
159 +"<div class=\"block\"><span class=\"deprecationComment\">This package is <b>Deprecated</b>." |
158 +"<div class=\"block\"><span class=\"deprecationComment\">This package is <b>Deprecated</b>." |
160 + " Use pkg1.</span></div>" |
159 + " Use pkg1.</span></div>" |
161 }, |
160 }, |
162 {PROFILE_BUG_ID + "/pkgDeprecated/package-summary.html", |
161 { "pkgDeprecated/package-summary.html", |
163 "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span>\n" |
162 "<div class=\"deprecatedContent\"><span class=\"deprecatedLabel\">Deprecated.</span>\n" |
164 + "<div class=\"block\"><span class=\"deprecationComment\">This package is <b>Deprecated</b>." |
163 + "<div class=\"block\"><span class=\"deprecationComment\">This package is <b>Deprecated</b>." |
165 + " Use pkg1.</span></div>" |
164 + " Use pkg1.</span></div>" |
166 }, |
165 }, |
167 // need to add teststring when JDK-8015496 will be fixed |
166 // need to add teststring when JDK-8015496 will be fixed |
168 //Test exception in profiles |
167 //Test exception in profiles |
169 {PROFILE_BUG_ID + "/compact1-summary.html", |
168 { "compact1-summary.html", |
170 "<table class=\"typeSummary\" " |
169 "<table class=\"typeSummary\" " |
171 + "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " |
170 + "border=\"0\" cellpadding=\"3\" cellspacing=\"0\" " |
172 + "summary=\"Exception Summary table, listing exceptions, and an explanation\">\n" |
171 + "summary=\"Exception Summary table, listing exceptions, and an explanation\">\n" |
173 + "<caption><span>Exception Summary</span><span class=\"tabEnd\">" |
172 + "<caption><span>Exception Summary</span><span class=\"tabEnd\">" |
174 + " </span></caption>\n" + |
173 + " </span></caption>\n" + |
200 "<td class=\"colFirst\">" |
199 "<td class=\"colFirst\">" |
201 + "<a href=\"pkg2/ClassError.html\" title=\"class in pkg2\">ClassError</a></td>" |
200 + "<a href=\"pkg2/ClassError.html\" title=\"class in pkg2\">ClassError</a></td>" |
202 } |
201 } |
203 }; |
202 }; |
204 private static final String[][] PROFILES_NEGATED_TEST = { |
203 private static final String[][] PROFILES_NEGATED_TEST = { |
205 {PROFILE_BUG_ID + "/pkg3/Class2Pkg3.html", |
204 { "pkg3/Class2Pkg3.html", |
206 "<div class=\"subTitle\">compact1" |
205 "<div class=\"subTitle\">compact1" |
207 }, |
206 }, |
208 {PROFILE_BUG_ID + "/pkg3/Interface1Pkg3.html", |
207 { "pkg3/Interface1Pkg3.html", |
209 "<div class=\"subTitle\">compact1" |
208 "<div class=\"subTitle\">compact1" |
210 }, |
209 }, |
211 {PROFILE_BUG_ID + "/pkg4/compact2-package-frame.html", |
210 { "pkg4/compact2-package-frame.html", |
212 "<li><a href=\"Anno1Pkg4.html\" title=\"annotation in pkg4\" " |
211 "<li><a href=\"Anno1Pkg4.html\" title=\"annotation in pkg4\" " |
213 + "target=\"classFrame\">Anno1Pkg4</a></li>" |
212 + "target=\"classFrame\">Anno1Pkg4</a></li>" |
214 }, |
213 }, |
215 {PROFILE_BUG_ID + "/compact1-summary.html","<li>Use</li>" |
214 { "compact1-summary.html","<li>Use</li>" |
216 }, |
215 }, |
217 {PROFILE_BUG_ID + "/compact2-summary.html", |
216 { "compact2-summary.html", |
218 "<ul class=\"blockList\">\n" + |
217 "<ul class=\"blockList\">\n" + |
219 "<li class=\"blockList\">\n" |
218 "<li class=\"blockList\">\n" |
220 + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">" |
219 + "<h3><a href=\"pkg2/compact2-package-summary.html\" target=\"classFrame\">" |
221 + "pkg2</a></h3>\n" + |
220 + "pkg2</a></h3>\n" + |
222 "<li class=\"blockList\">\n" |
221 "<li class=\"blockList\">\n" |
223 + "<table class=\"typeSummary\" border=\"0\" " |
222 + "<table class=\"typeSummary\" border=\"0\" " |
224 + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " |
223 + "cellpadding=\"3\" cellspacing=\"0\" summary=\"Class Summary table, " |
225 + "listing classes, and an explanation\">" |
224 + "listing classes, and an explanation\">" |
226 }, |
225 }, |
227 {PROFILE_BUG_ID + "/pkg5/compact3-package-summary.html", |
226 { "pkg5/compact3-package-summary.html", |
228 "<ul class=\"blockList\">\n" + |
227 "<ul class=\"blockList\">\n" + |
229 "<li class=\"blockList\">\n" |
228 "<li class=\"blockList\">\n" |
230 + "<li class=\"blockList\">\n" |
229 + "<li class=\"blockList\">\n" |
231 + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " |
230 + "<table class=\"typeSummary\" border=\"0\" cellpadding=\"3\" " |
232 + "cellspacing=\"0\" summary=\"Interface Summary table, listing " |
231 + "cellspacing=\"0\" summary=\"Interface Summary table, listing " |
233 + "interfaces, and an explanation\">" |
232 + "interfaces, and an explanation\">" |
234 } |
233 } |
235 }; |
234 }; |
236 private static final String[][] PACKAGES_TEST = { |
235 private static final String[][] PACKAGES_TEST = { |
237 {PACKAGE_BUG_ID + "/overview-frame.html", |
236 { "overview-frame.html", |
238 "<h2 title=\"Packages\">Packages</h2>" |
237 "<h2 title=\"Packages\">Packages</h2>" |
239 }, |
238 }, |
240 {PACKAGE_BUG_ID + "/pkg4/package-frame.html", |
239 { "pkg4/package-frame.html", |
241 "<h1 class=\"bar\"><a href=\"../pkg4/package-summary.html\" " |
240 "<h1 class=\"bar\"><a href=\"../pkg4/package-summary.html\" " |
242 + "target=\"classFrame\">pkg4</a></h1>" |
241 + "target=\"classFrame\">pkg4</a></h1>" |
243 }, |
242 }, |
244 {PACKAGE_BUG_ID + "/pkg4/package-summary.html", |
243 { "pkg4/package-summary.html", |
245 "<div class=\"header\">\n" + |
244 "<div class=\"header\">\n" + |
246 "<h1 title=\"Package\" " |
245 "<h1 title=\"Package\" " |
247 + "class=\"title\">Package pkg4</h1>\n" + |
246 + "class=\"title\">Package pkg4</h1>\n" + |
248 "</div>" |
247 "</div>" |
249 } |
248 } |
250 }; |
249 }; |
251 private static final String[][] PACKAGES_NEGATED_TEST = { |
250 private static final String[][] PACKAGES_NEGATED_TEST = { |
252 {PACKAGE_BUG_ID + "/overview-frame.html", |
251 { "overview-frame.html", |
253 "<span><a href=\"profile-overview-frame.html\" " |
252 "<span><a href=\"profile-overview-frame.html\" " |
254 + "target=\"packageListFrame\">All Profiles</a></span>" |
253 + "target=\"packageListFrame\">All Profiles</a></span>" |
255 }, |
254 }, |
256 {PACKAGE_BUG_ID + "/pkg2/Class1Pkg2.html", |
255 { "pkg2/Class1Pkg2.html", |
257 "<div class=\"subTitle\">compact1, compact2, compact3</div>" |
256 "<div class=\"subTitle\">compact1, compact2, compact3</div>" |
258 }, |
257 }, |
259 {PACKAGE_BUG_ID + "/overview-summary.html", |
258 { "overview-summary.html", |
260 "<ul>\n" + |
259 "<ul>\n" + |
261 "<li><a href=\"compact1-summary.html\" target=\"classFrame\">" + |
260 "<li><a href=\"compact1-summary.html\" target=\"classFrame\">" + |
262 "compact1</a></li>\n" + |
261 "compact1</a></li>\n" + |
263 "<li><a href=\"compact2-summary.html\" " + |
262 "<li><a href=\"compact2-summary.html\" " + |
264 "target=\"classFrame\">compact2</a></li>\n" + |
263 "target=\"classFrame\">compact2</a></li>\n" + |