4 https://bugzilla.mozilla.org/show_bug.cgi?id=343596
7 <title>Test for Bug
343596</title>
8 <script type=
"text/javascript" src=
"/MochiKit/MochiKit.js"></script>
9 <script type=
"text/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=343596">Mozilla Bug
343596</a>
15 <script id=
"foo"></script>
16 <div id=
"content" style=
"display: none">
20 <script class=
"testbody" type=
"text/javascript">
22 /** Test for Bug
343596 **/
24 SimpleTest.waitForExplicitFinish();
26 /** Cut error handling, because we're going to throw on purpose**/
27 var errorHandler = window.onerror;
28 window.onerror = null;
32 // Insert text into an empty script node that will cause a syntax error.
33 document.getElementById(
"foo").appendChild(document.createTextNode(
"("));
36 // Note that this catch block does not execute.
37 ok(false,
"this catch block should not execute");
40 setTimeout(function(){
41 ok(true,
"setTimeout still executes after bogus script insertion");
42 window.error = errorHandler;
43 SimpleTest.finish();},
200);