Mercurial > hg > openjdk > jdk6 > langtools
changeset 185:a2df39e0fc28
8024756: method grouping tabs are not selectable
Reviewed-by: jjg
author | bpatel |
---|---|
date | Wed, 09 Nov 2016 16:11:46 +0000 |
parents | 1ecc140f8045 |
children | e886d9050af5 |
files | src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java test/com/sun/javadoc/testJavascript/TestJavascript.java |
diffstat | 3 files changed, 23 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed Aug 24 23:12:17 2016 +0100 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed Nov 09 16:11:46 2016 +0000 @@ -288,8 +288,12 @@ if(winTitle != null && winTitle.length() > 0) { script.addAttr(HtmlAttr.TYPE, "text/javascript"); String scriptCode = "<!--" + DocletConstants.NL + - " if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL + - " parent.document.title=\"" + escapeJavaScriptChars(winTitle) + "\";" + DocletConstants.NL + + " try {" + DocletConstants.NL + + " if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL + + " parent.document.title=\"" + escapeJavaScriptChars(winTitle) + "\";" + DocletConstants.NL + + " }" + DocletConstants.NL + + " }" + DocletConstants.NL + + " catch(err) {" + DocletConstants.NL + " }" + DocletConstants.NL + "//-->" + DocletConstants.NL; RawHtml scriptContent = new RawHtml(scriptCode);
--- a/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java Wed Aug 24 23:12:17 2016 +0100 +++ b/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java Wed Nov 09 16:11:46 2016 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2005, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -23,7 +23,7 @@ /* * @test - * @bug 4645058 4747738 4855054 + * @bug 4645058 4747738 4855054 8024756 * @summary Javascript IE load error when linked by -linkoffline * Window title shouldn't change when loading left frames (javascript) * @author dkramer @@ -115,9 +115,13 @@ // Test that win title javascript is followed by NOSCRIPT code. {"<script type=\"text/javascript\"><!--" + LS + - " if (location.href.indexOf('is-external=true') == -1) {" + LS + - " parent.document.title=\"C (Window Title)\";" + LS + - " }" + LS + "//-->" + LS + "</script>", + " try {" + LS + + " if (location.href.indexOf('is-external=true') == -1) {" + LS + + " parent.document.title=\"C (Window Title)\";" + LS + + " }" + LS + + " }" + LS + + " catch(err) {" + LS + + " }" + LS + "//-->" + LS + "</script>", TMPDEST_DIR1 + FS + "p1" + FS + "C.html" }
--- a/test/com/sun/javadoc/testJavascript/TestJavascript.java Wed Aug 24 23:12:17 2016 +0100 +++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java Wed Nov 09 16:11:46 2016 +0000 @@ -23,7 +23,7 @@ /* * @test - * @bug 4665566 4855876 8012375 8015998 + * @bug 4665566 4855876 8012375 8015998 8024756 * @summary Verify that the output has the right javascript. * @author jamieh * @library ../lib/ @@ -97,9 +97,13 @@ //Make sure title javascript only runs if is-external is not true {BUG_ID + FS + "pkg" + FS + "C.html", - " if (location.href.indexOf('is-external=true') == -1) {" + NL + - " parent.document.title=\"C\";" + NL + - " }"}, + " try {" + NL + + " if (location.href.indexOf('is-external=true') == -1) {" + NL + + " parent.document.title=\"C\";" + NL + + " }" + NL + + " }" + NL + + " catch(err) {" + NL + + " }"}, }; private static final String[][] NEGATED_TEST = NO_TEST;