2 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=33815">bug
33815</a>: Crash when using DOMTimer from a detached frame.
</p>
3 <p>Pass if no crash.
</p>
4 <iframe src=
"about:blank"></iframe>
7 if (window
.testRunner
) {
8 testRunner
.dumpAsText();
9 testRunner
.waitUntilDone();
14 if (window
.GCController
)
15 return GCController
.collect();
17 for (var i
= 0; i
< 10000; i
++) { // > force garbage collection (FF requires about 9K allocations before a collect)
18 var s
= new String("");
26 var w_setTimeout
= w
.setTimeout
;
27 var w_clearTimeout
= w
.clearTimeout
;
28 var w_setInterval
= w
.setInterval
;
29 var w_clearInterval
= w
.clearInterval
;
30 document
.body
.removeChild(document
.getElementsByTagName("iframe")[0]);
31 setTimeout(function() {
33 try { w_setTimeout
.call(w
, "alert('FAIL: timeout ran');", 0); } catch (ex
) { }
34 try { w_clearTimeout
.call(w
, 0) } catch (ex
) { }
35 try { w_setInterval
.call(w
, "alert('FAIL: interval ran');", 0); } catch (ex
) { }
36 try { w_clearInterval
.call(w
, 0) } catch (ex
) { }
38 if (window
.testRunner
)
39 testRunner
.notifyDone();