2011-04-11 Xianzhu Wang <wangxianzhu@google.com>

        Reviewed by Tony Gentilcore.

        loader/reload-subresource-when-type-changes.html might be flaky
        https://bugs.webkit.org/show_bug.cgi?id=56360

        Onload of the third image might be triggered before that of the second image.
        This might ahppen in environment with slow access (such as NFS, or tests
        accessed through HTTP).

        * loader/reload-subresource-when-type-changes.html:
        * loader/resources/reload-subresource-when-type-changes.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83554 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent d2bd4510
2011-04-11 Xianzhu Wang <wangxianzhu@google.com>
Reviewed by Tony Gentilcore.
loader/reload-subresource-when-type-changes.html might be flaky
https://bugs.webkit.org/show_bug.cgi?id=56360
Onload of the third image might be triggered before that of the second image.
This might ahppen in environment with slow access (such as NFS, or tests
accessed through HTTP).
* loader/reload-subresource-when-type-changes.html:
* loader/resources/reload-subresource-when-type-changes.js:
2011-04-11 Sam Weinig <sam@webkit.org>
Reviewed by Anders Carlsson.
......@@ -16,12 +16,23 @@ function log(string)
logDiv.appendChild(document.createElement("br"));
}
var loaded = 0;
var messages = [];
function checkLoadedImage(event, testNumber) {
var imageWidth = event.target.width;
if (imageWidth == 25)
log("PASS " + testNumber + " of 3");
resourceLoaded("PASS ", testNumber);
else
log("IMAGE SIZE " + imageWidth + " FAIL - " + testNumber + " of 2");
resourceLoaded("IMAGE SIZE " + imageWidth + " FAIL - ", testNumber);
}
function resourceLoaded(message, testNumber) {
messages[testNumber] = message + testNumber + " of 3";
if (++loaded == 3) {
for (var i = 1; i <= 3; i++)
log(messages[i]);
}
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment