2 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=33813">bug
33813</a>: Crash when using DOMApplicationCache from a destroyed frame.
</p>
3 <p>PASS if didn't crash.
</p>
4 <iframe src=
"about:blank"></iframe>
6 <script src=
"/js-test-resources/js-test.js"></script>
10 if (window
.testRunner
) {
11 testRunner
.dumpAsText();
12 testRunner
.waitUntilDone();
19 ifrCache
= frames
[0].applicationCache
;
20 document
.body
.removeChild(document
.getElementsByTagName("iframe")[0]);
21 setTimeout(function() {
23 ifrCache
.onchecking = function() { }
24 ifrCache
.onerror = function() { }
25 ifrCache
.onnoupdate = function() { }
26 ifrCache
.ondownloading = function() { }
27 ifrCache
.onprogress = function() { }
28 ifrCache
.onupdateready = function() { }
29 ifrCache
.oncached = function() { }
30 ifrCache
.onobsolete = function() { }
31 ifrCache
.addEventListener("error", function() { }, true);
33 var evt
= document
.createEvent("Event");
34 evt
.initEvent("error", true, true);
35 ifrCache
.dispatchEvent(evt
);
37 try { ifrCache
.update(); } catch (ex
) { }
38 try { ifrCache
.swapCache(); } catch (ex
) { }
40 if (window
.testRunner
)
41 testRunner
.notifyDone();