2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / fast / dom / script-element-gc.html
blobb3916772cd3919a3d068c238cbf093d70c7456f4
1 <html>
2 <script>
3 function runTest() {
4 if (window.layoutTestController)
5 layoutTestController.dumpAsText();
7 var s = document.createElement('script');
8 s.setAttribute('onload', 'alert("Script onload handler called!")')
9 s.id = "theScript";
10 s.src = "resources/script-element-gc.js";
12 document.body.appendChild(s);
14 </script>
15 <body onload="runTest()">
16 This tests that removing the script element from the script loaded by the element itself, and then garbage collecting does not cause a crash when dispatching the onload element (because the script element was freed).
17 <p>SUCCESS! Didn't Crash!</p>
18 </body>
19 </html>