Path: blob/master/test/langtools/jdk/javadoc/doclet/ValidHtml/ValidHtml.java
40971 views
/*1* Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @bug 4275630 4749453 4625400 4753048 4415270 8074521 8182765 819620226* @summary Generated HTML is invalid with frames.27* Displays unnecessary horizontal scroll bars.28* Missing whitespace in DOCTYPE declaration29* HTML table tags inserted in wrong place in pakcage use page30* @library ../../lib31* @modules jdk.javadoc/jdk.javadoc.internal.tool32* @build javadoc.tester.*33* @run main ValidHtml34*/3536import javadoc.tester.JavadocTester;3738public class ValidHtml extends JavadocTester {3940public static void main(String... args) throws Exception {41ValidHtml tester = new ValidHtml();42tester.runTests();43}4445@Test46public void test() {47// Test for all cases except the split index page48javadoc("-d", "out",49"-doctitle", "Document Title",50"-windowtitle", "Window Title",51"-use",52"-overview", testSrc("overview.html"),53"-sourcepath", testSrc,54"p1", "p2");55checkExit(Exit.OK);56String HTML5 = "<!DOCTYPE HTML>";57checkValidHTML(HTML5);58}5960void checkValidHTML(String doctype) {61// Test the proper DOCTYPE element are present:62checkOutput("index.html", true, doctype);63checkOutput("overview-summary.html", true, doctype);64checkOutput("p1/package-summary.html", true, doctype);65checkOutput("p1/C.html", true, doctype);66}67}686970