4 https://bugzilla.mozilla.org/show_bug.cgi?id=936129
8 <title>Test for Bug
936129</title>
9 <script type=
"application/javascript" src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
11 <script type=
"application/javascript">
13 /** Test for Bug
936129 **/
14 SimpleTest.waitForExplicitFinish();
18 ok(true,
"Bareword setTimeout should work after calling document.open().");
20 var iframe = document.getElementById(
"testFrame");
21 iframe.onload = function () {
22 window.runTest2 = iframe.contentWindow.runTest2;
23 iframe.onload = function () {
27 iframe.src =
"about:blank";
29 iframe.src =
"data:text/html,<script>function runTest2() { setTimeout('parent.test2Done()'); };<" + "/script>";
31 window
.test2DoneCalled
= false;
34 window
.test2DoneCalled
= true;
38 ok(!window
.test2DoneCalled
, "Bareword setTimeout should be a noop after the document for the window context that it's called on isn't active anymore.");
45 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=936129">Mozilla Bug
936129</a>
47 <div id=
"content" style=
"display: none">
48 <iframe id=
"testFrame" src=
"data:text/html,<script>window.onload = function runTest1() { document.open(); setTimeout('parent.test1Done();'); document.close(); }</script>"></iframe
>