langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java
changeset 20614 994200acf1e4
parent 20257 9da4f6c30089
child 23971 f5ff1f5a8dee
--- a/langtools/test/com/sun/javadoc/testJavascript/TestJavascript.java	Fri Oct 04 13:32:30 2013 -0700
+++ b/langtools/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;