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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/script-element-moved-by-onerror-sync-crash.html

Issue 1620983002: Also transfer pending in-order scripts upon element moving to new document (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: also remove is-disposed checking; unnecessary Created 4 years, 11 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 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script> 5 <script>
6 var jsTestIsAsync = true; 6 var jsTestIsAsync = true;
7 var newScriptElement; 7 var newScriptElement;
8 8
9 function start() 9 function start()
10 { 10 {
11 newScriptElement = document.createElement('script'); 11 newScriptElement = document.createElement('script');
12 newScriptElement.async = false;
12 document.body.appendChild(newScriptElement); 13 document.body.appendChild(newScriptElement);
13 newScriptElement.onerror = customOnError; 14 newScriptElement.onerror = customOnError;
14 newScriptElement.src = 'foobarbaz'; 15 newScriptElement.src = 'foobarbaz';
15 } 16 }
16 17
17 function customOnError() 18 function customOnError()
18 { 19 {
19 document.body.removeChild(newScriptElement); 20 document.body.removeChild(newScriptElement);
20 var otherDocument = document.getElementById('frame').contentWindow.document; 21 var otherDocument = document.getElementById('frame').contentWindow.document;
21 otherDocument.documentElement.appendChild(newScriptElement); 22 otherDocument.documentElement.appendChild(newScriptElement);
22 finishJSTest(); 23 finishJSTest();
23 } 24 }
24 </script> 25 </script>
25 </head> 26 </head>
26 <body onload="start()"> 27 <body onload="start()">
27 Checks that we handle scripts which move to a different document inside their on error handlers. 28 Checks that we handle sync scripts which move to a different document inside the ir onerror handlers.
28 <div id="console"></div> 29 <div id="console"></div>
29 <iframe id="frame"></iframe> 30 <iframe id="frame"></iframe>
30 </body> 31 </body>
31 </html> 32 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/dom/HTMLScriptElement/script-element-moved-by-onerror-sync-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698