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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/parser/close-while-stopping.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 <!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 </head> 5 </head>
6 <body> 6 <body>
7 <iframe id="aframe"></iframe> 7 <iframe id="aframe"></iframe>
8 <script> 8 <script>
9 description("Test that explicitly closing the document while it is already closi ng doesn't result in running the end twice."); 9 description("Test that explicitly closing the document while it is already closi ng doesn't result in running the end twice.");
10 jsTestIsAsync = true;
10 11
11 var frameDocument = document.getElementById("aframe").contentDocument; 12 var frameDocument = document.getElementById("aframe").contentDocument;
12 frameDocument.open(); 13 frameDocument.open();
13 frameDocument.onreadystatechange = function() 14 frameDocument.onreadystatechange = function()
14 { 15 {
15 debug(frameDocument.readyState); 16 debug(frameDocument.readyState);
16 frameDocument.close(); 17 frameDocument.close();
18 if (frameDocument.readyState === 'complete') {
19 setTimeout(finishJSTest, 100);
20 }
17 }; 21 };
18 frameDocument.write("<script>document.close()</scr"+"ipt>"); 22 frameDocument.write("<script>document.close()</scr"+"ipt>");
19 </script> 23 </script>
20 </body> 24 </body>
21 </html> 25 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698