Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / events / before-unload-crash.html
blobd9a47930b3189dd2b2125aeb9e0351176e5b945b
1 <script src="../../resources/js-test.js"></script>
2 <script>
3 function test(iframe) {
4 iframe.contentWindow.location.href = "resources/does-not-exist.html";
5 testPassed('if no crash');
7 </script>
8 <iframe id=testIframe onload="test(this)"></iframe>
9 <script>
10 description('Detaching a frame in beforeunload event handler should not crash.');
11 var testIframe = document.getElementById('testIframe');
12 testIframe.contentWindow.onbeforeunload = function(event) {
13 testIframe.parentNode.removeChild(testIframe);
14 event.returnValue = 'beforeunload';
16 </script>