提交 6ea2c144 编写于 作者: B bpatel

8024756: method grouping tabs are not selectable

Reviewed-by: jjg
上级 8bbcd4ea
...@@ -310,8 +310,12 @@ public class HtmlWriter { ...@@ -310,8 +310,12 @@ public class HtmlWriter {
if(winTitle != null && winTitle.length() > 0) { if(winTitle != null && winTitle.length() > 0) {
script.addAttr(HtmlAttr.TYPE, "text/javascript"); script.addAttr(HtmlAttr.TYPE, "text/javascript");
String scriptCode = "<!--" + DocletConstants.NL + String scriptCode = "<!--" + DocletConstants.NL +
" if (location.href.indexOf('is-external=true') == -1) {" + DocletConstants.NL + " try {" + DocletConstants.NL +
" parent.document.title=\"" + winTitle + "\";" + 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 +
"//-->" + DocletConstants.NL; "//-->" + DocletConstants.NL;
RawHtml scriptContent = new RawHtml(scriptCode); RawHtml scriptContent = new RawHtml(scriptCode);
......
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/* /*
* @test * @test
* @bug 4645058 4747738 4855054 * @bug 4645058 4747738 4855054 8024756
* @summary Javascript IE load error when linked by -linkoffline * @summary Javascript IE load error when linked by -linkoffline
* Window title shouldn't change when loading left frames (javascript) * Window title shouldn't change when loading left frames (javascript)
* @author dkramer * @author dkramer
...@@ -115,9 +115,13 @@ public class JavascriptWinTitle { ...@@ -115,9 +115,13 @@ public class JavascriptWinTitle {
// Test that win title javascript is followed by NOSCRIPT code. // Test that win title javascript is followed by NOSCRIPT code.
{"<script type=\"text/javascript\"><!--" + LS + {"<script type=\"text/javascript\"><!--" + LS +
" if (location.href.indexOf('is-external=true') == -1) {" + LS + " try {" + LS +
" parent.document.title=\"C (Window Title)\";" + LS + " if (location.href.indexOf('is-external=true') == -1) {" + LS +
" }" + LS + "//-->" + LS + "</script>", " parent.document.title=\"C (Window Title)\";" + LS +
" }" + LS +
" }" + LS +
" catch(err) {" + LS +
" }" + LS + "//-->" + LS + "</script>",
TMPDEST_DIR1 + FS + "p1" + FS + "C.html" TMPDEST_DIR1 + FS + "p1" + FS + "C.html"
} }
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/* /*
* @test * @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. * @summary Verify that the output has the right javascript.
* @author jamieh * @author jamieh
* @library ../lib/ * @library ../lib/
...@@ -104,9 +104,13 @@ public class TestJavascript extends JavadocTester { ...@@ -104,9 +104,13 @@ public class TestJavascript extends JavadocTester {
//Make sure title javascript only runs if is-external is not true //Make sure title javascript only runs if is-external is not true
{BUG_ID + FS + "pkg" + FS + "C.html", {BUG_ID + FS + "pkg" + FS + "C.html",
" if (location.href.indexOf('is-external=true') == -1) {" + NL + " try {" + NL +
" parent.document.title=\"C\";" + 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; private static final String[][] NEGATED_TEST = NO_TEST;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册