Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/events/before-unload-crash.html

Issue 1475863005: [Async][WIP] Call FrameLoader::checkCompleted() asynchronously to avoid sync body.onload() Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <script src="../../resources/js-test.js"></script> 1 <script src="../../resources/js-test.js"></script>
2 <script> 2 <script>
3 var jsTestIsAsync = true;
4
3 function test(iframe) { 5 function test(iframe) {
4 iframe.contentWindow.location.href = "resources/does-not-exist.html"; 6 iframe.contentWindow.location.href = "resources/does-not-exist.html";
5 testPassed('if no crash'); 7 testPassed('if no crash');
8 finishJSTest();
6 } 9 }
7 </script> 10 </script>
8 <iframe id=testIframe onload="test(this)"></iframe> 11 <iframe id=testIframe onload="test(this)"></iframe>
9 <script> 12 <script>
10 description('Detaching a frame in beforeunload event handler should not crash.') ; 13 description('Detaching a frame in beforeunload event handler should not crash.') ;
11 var testIframe = document.getElementById('testIframe'); 14 var testIframe = document.getElementById('testIframe');
12 testIframe.contentWindow.onbeforeunload = function(event) { 15 testIframe.contentWindow.onbeforeunload = function(event) {
13 testIframe.parentNode.removeChild(testIframe); 16 testIframe.parentNode.removeChild(testIframe);
14 event.returnValue = 'beforeunload'; 17 event.returnValue = 'beforeunload';
15 } 18 }
16 </script> 19 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698