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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html b/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
index c5665aab692ced021d82911b43ad40d83f0ed609..03c506931d1bae12edc15b301ff602fa862b9148 100644
--- a/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
+++ b/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html
@@ -6,20 +6,28 @@ if (window.testRunner) {
testRunner.waitUntilDone();
}
-function firstPartLoaded()
+function hoge()
{
+ // <img onload="window.stop();"> works correctly.
+ console.log("hoge");
+// setTimeout(function(){console.log("stop");window.stop();console.log("stopDone");}, 0);
window.stop();
- window.setTimeout(function() {
- var broken = (testingImage.width != 2 && testingImage != 76);
- document.getElementById("results").innerHTML = broken ? "PASS" : "FAIL";
- if (window.testRunner)
- testRunner.notifyDone();
- }, 100);
+ console.log("hogeDone");
}
+
+function onLoad()
+{
+ console.log("onload");
+ document.getElementById("results").innerHTML = "PASS";
+ if (window.testRunner) {
+ testRunner.notifyDone();
+ }
+}
+function onR() { console.log("Q" + document.readyState); }
</script>
</head>
-<body>
-<img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png" onload="firstPartLoaded()">
+<body onload="onLoad()" onreadystatechange="onR()">
+<img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png" onload="hoge()">
<p id="results"></p>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698