Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / script-element-gc.html
blobcaca15ee5af9b0bb7c42d74700821fbcfd3b29d6
1 <html>
2 <script>
3 function runTest() {
4 if (window.testRunner) {
5 testRunner.dumpAsText();
6 testRunner.waitUntilDone();
9 var s = document.createElement('script');
10 s.setAttribute('onload', 'alert("Script onload handler called!"); if (window.testRunner) testRunner.notifyDone()');
11 s.id = "theScript";
12 s.src = "resources/script-element-gc.js";
14 document.body.appendChild(s);
16 </script>
17 <body onload="runTest()">
18 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).
19 <p>SUCCESS! Didn't Crash!</p>
20 </body>
21 </html>