Mercurial > hg > openjdk > lambda > langtools
changeset 2503:3344ea7404b1
8024756: method grouping tabs are not selectable
Reviewed-by: jjg
author | bpatel |
---|---|
date | Fri, 04 Oct 2013 13:41:13 -0700 |
parents | 6e186ca11ec0 |
children | 2fa6ced325cc |
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 Oct 04 13:32:30 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Fri Oct 04 13:41:13 2013 -0700 @@ -310,8 +310,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=\"" + winTitle + "\";" + DocletConstants.NL + + " try {" + DocletConstants.NL + + " if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL + + " parent.document.title=\"" + 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 Oct 04 13:32:30 2013 -0700 +++ b/test/com/sun/javadoc/JavascriptWinTitle/JavascriptWinTitle.java Fri Oct 04 13:41:13 2013 -0700 @@ -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 Oct 04 13:32:30 2013 -0700 +++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java Fri Oct 04 13:41:13 2013 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 4665566 4855876 7025314 8012375 8015997 8016328 + * @bug 4665566 4855876 7025314 8012375 8015997 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;