Mercurial > hg > icedtea7-forest > langtools
changeset 2197:77c1fe109193
8024756: method grouping tabs are not selectable
Reviewed-by: jjg
author | bpatel |
---|---|
date | Wed, 12 Oct 2016 17:37:29 +0100 |
parents | 457d1a8ad53c |
children | 2f2976a5f69e |
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 Fri Apr 11 03:13:03 2014 +0000 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed Oct 12 17:37:29 2016 +0100 @@ -291,8 +291,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 Fri Apr 11 03:13:03 2014 +0000 +++ b/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java Wed Oct 12 17:37:29 2016 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2002, 2010, 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 Fri Apr 11 03:13:03 2014 +0000 +++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java Wed Oct 12 17:37:29 2016 +0100 @@ -23,7 +23,7 @@ /* * @test - * @bug 4665566 4855876 7025314 8012375 8015998 8016328 + * @bug 4665566 4855876 7025314 8012375 8015998 8016328 8024756 * @summary Verify that the output has the right javascript. * @author jamieh * @library ../lib/ @@ -104,9 +104,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;