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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.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 <html> 1 <html>
2 <head> 2 <head>
3 <script> 3 <script>
4 if (window.testRunner) { 4 if (window.testRunner) {
5 testRunner.dumpAsText(); 5 testRunner.dumpAsText();
6 testRunner.waitUntilDone(); 6 testRunner.waitUntilDone();
7 } 7 }
8 8
9 function firstPartLoaded() 9 function hoge()
10 { 10 {
11 // <img onload="window.stop();"> works correctly.
12 console.log("hoge");
13 // setTimeout(function(){console.log("stop");window.stop();console.log("stopD one");}, 0);
11 window.stop(); 14 window.stop();
12 window.setTimeout(function() { 15 console.log("hogeDone");
13 var broken = (testingImage.width != 2 && testingImage != 76);
14 document.getElementById("results").innerHTML = broken ? "PASS" : "FAIL";
15 if (window.testRunner)
16 testRunner.notifyDone();
17 }, 100);
18 } 16 }
17
18 function onLoad()
19 {
20 console.log("onload");
21 document.getElementById("results").innerHTML = "PASS";
22 if (window.testRunner) {
23 testRunner.notifyDone();
24 }
25 }
26 function onR() { console.log("Q" + document.readyState); }
19 </script> 27 </script>
20 </head> 28 </head>
21 <body> 29 <body onload="onLoad()" onreadystatechange="onR()">
22 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre en.png&img2=abe.png" onload="firstPartLoaded()"> 30 <img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-gre en.png&img2=abe.png" onload="hoge()">
23 <p id="results"></p> 31 <p id="results"></p>
24 </body> 32 </body>
25 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698