author | bpatel |
Tue, 06 Mar 2018 10:45:47 -0800 | |
changeset 49139 | 771616d26ca1 |
parent 47216 | 71c04702a3d5 |
child 50293 | edfb87b2520e |
permissions | -rw-r--r-- |
43755
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
1 |
/* |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
2 |
* Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved. |
43755
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
4 |
* |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
8 |
* |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
13 |
* accompanied this code). |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
14 |
* |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
18 |
* |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
21 |
* questions. |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
22 |
*/ |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
23 |
|
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
24 |
/* |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
25 |
* @test |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
26 |
* @bug 8173302 8182765 |
43755
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
27 |
* @summary make sure the overview-summary and module-summary pages don't |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
28 |
* don't have the See link, and the overview is copied correctly. |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
29 |
* @library ../lib |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
30 |
* @modules jdk.javadoc/jdk.javadoc.internal.tool |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
31 |
* @build JavadocTester |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
32 |
* @run main TestOverview |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
33 |
*/ |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
34 |
|
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
35 |
public class TestOverview extends JavadocTester { |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
36 |
|
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
37 |
public static void main(String... args) throws Exception { |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
38 |
TestOverview tester = new TestOverview(); |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
39 |
tester.runTests(); |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
40 |
} |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
41 |
|
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
42 |
@Test |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
43 |
void test1() { |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
44 |
javadoc("-d", "out-1", |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
45 |
"-doctitle", "Document Title", |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
46 |
"-windowtitle", "Window Title", |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
47 |
"-overview", testSrc("overview.html"), |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
48 |
"-sourcepath", testSrc("src"), |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
49 |
"p1", "p2"); |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
50 |
checkExit(Exit.OK); |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
51 |
checkOverview(); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
52 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
53 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
54 |
@Test |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
55 |
void test1_html4() { |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
56 |
javadoc("-d", "out-1-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
57 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
58 |
"-doctitle", "Document Title", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
59 |
"-windowtitle", "Window Title", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
60 |
"-overview", testSrc("overview.html"), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
61 |
"-sourcepath", testSrc("src"), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
62 |
"p1", "p2"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
63 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
64 |
checkOverview_html4(); |
43755
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
65 |
} |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
66 |
|
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
67 |
@Test |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
68 |
void test2() { |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
69 |
javadoc("-d", "out-2", |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
70 |
"-doctitle", "Document Title", |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
71 |
"-windowtitle", "Window Title", |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
72 |
"-overview", testSrc("overview.html"), |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
73 |
"-sourcepath", testSrc("msrc"), |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
74 |
"p1", "p2"); |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
75 |
checkExit(Exit.OK); |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
76 |
checkOverview(); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
77 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
78 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
79 |
@Test |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
80 |
void test2_html4() { |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
81 |
javadoc("-d", "out-2-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
82 |
"-html4", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
83 |
"-doctitle", "Document Title", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
84 |
"-windowtitle", "Window Title", |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
85 |
"-overview", testSrc("overview.html"), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
86 |
"-sourcepath", testSrc("msrc"), |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
87 |
"p1", "p2"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
88 |
checkExit(Exit.OK); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
89 |
checkOverview_html4(); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
90 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
91 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
92 |
void checkOverview() { |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
93 |
checkOutput("overview-summary.html", true, |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
94 |
"<div class=\"header\">\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
95 |
+ "<h1 class=\"title\">Document Title</h1>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
96 |
+ "</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
97 |
+ "<main role=\"main\">\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
98 |
+ "<div class=\"contentContainer\">\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
99 |
+ "<div class=\"block\">This is line1. This is line 2.</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
100 |
+ "</div>\n" |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
101 |
+ "<div class=\"contentContainer\">"); |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
102 |
} |
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
103 |
|
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
104 |
void checkOverview_html4() { |
43755
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
105 |
checkOutput("overview-summary.html", true, |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
106 |
"<div class=\"header\">\n" |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
107 |
+ "<h1 class=\"title\">Document Title</h1>\n" |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
108 |
+ "</div>\n" |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
109 |
+ "<div class=\"contentContainer\">\n" |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
110 |
+ "<div class=\"block\">This is line1. This is line 2.</div>\n" |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
111 |
+ "</div>\n" |
49139
771616d26ca1
8182765: HTML5 must be the default javadoc codegen mode in the near future
bpatel
parents:
47216
diff
changeset
|
112 |
+ "<div class=\"contentContainer\">"); |
43755
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
113 |
} |
ae42964e27e3
8173302: Move the Description up on module and package index page
ksrini
parents:
diff
changeset
|
114 |
} |