Index: third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading-after-onload1.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html b/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading-after-onload1.html |
similarity index 62% |
copy from third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html |
copy to third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading-after-onload1.html |
index 31383c786d877efd8849bad27efb24badd8db683..dfcf6bc3defe45f84ab85292d7773ed5c046d26a 100644 |
--- a/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading.html |
+++ b/third_party/WebKit/LayoutTests/http/tests/multipart/stop-loading-after-onload1.html |
@@ -1,12 +1,14 @@ |
<html> |
<head> |
<script> |
+// This tests window.stop() can stop loading of multipart images after |
+// <img>'s onload and before the next part loaded after onload. |
if (window.testRunner) { |
testRunner.dumpAsText(); |
testRunner.waitUntilDone(); |
} |
-function firstPartLoaded() |
+function callStop() |
{ |
window.stop(); |
window.setTimeout(function() { |
@@ -16,10 +18,16 @@ function firstPartLoaded() |
testRunner.notifyDone(); |
}, 100); |
} |
+ |
+function firstPartLoaded() |
+{ |
+ setTimeout(callStop, 0); |
+} |
</script> |
</head> |
<body> |
-<img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png" onload="firstPartLoaded()"> |
+<!-- |label| is added to avoid interaction between stop-loading* tests --> |
+<img id=testingImage src="resources/multipart.php?interval=1&loop=1&img1=2x2-green.png&img2=abe.png&label=1" onload="firstPartLoaded()"> |
<p id="results"></p> |
</body> |
</html> |