Bug 56360 - loader/reload-subresource-when-type-changes.html might be flaky
Summary: loader/reload-subresource-when-type-changes.html might be flaky
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-14 20:42 PDT by Xianzhu Wang
Modified: 2011-04-11 20:58 PDT (History)
5 users (show)

See Also:


Attachments
patch (2.03 KB, patch)
2011-03-14 21:11 PDT, Xianzhu Wang
no flags Details | Formatted Diff | Diff
patch with updated ChangeLog (2.23 KB, patch)
2011-04-11 20:29 PDT, Xianzhu Wang
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Xianzhu Wang 2011-03-14 20:42:19 PDT
In loader/reload-subresource-when-type-changes.html:

<link rel="prefetch" href="resources/image1.png">
<img src="resources/image1.png" onerror="log('LOAD ERROR - FAIL 2 of 3)" onload="checkLoadedImage(event, 2)">

<script src="resources/image2.png"></script>
<img src="resources/image2.png" onerror="log('LOAD ERROR - FAIL 2 of 3)" onload="checkLoadedImage(event, 3)">

Because the last two images might be loaded asynchronously, onload of the third image might be triggered before that of the second image, thus the actual result might be:

PASS 3 of 3
PASS 2 of 3

The situation might not happen in normal test environment because the images are all accessed as local files. However, in an environment with slow access (such as NFS, or tests accessed through HTTP), this might happen.
Comment 1 Xianzhu Wang 2011-03-14 21:11:33 PDT
Created attachment 85768 [details]
patch
Comment 2 Gavin Peters 2011-03-15 13:38:52 PDT
Good catch, and it looks good to me.  I like that you save expectations.

I'm not a reviewer though.  Can I recommend ap or abarth peek at this to r+ it for you?
Comment 3 Xianzhu Wang 2011-03-15 18:07:03 PDT
(In reply to comment #2)
> Good catch, and it looks good to me.  I like that you save expectations.
> 
> I'm not a reviewer though.  Can I recommend ap or abarth peek at this to r+ it for you?

Sure. Thanks!
Comment 4 Xianzhu Wang 2011-03-28 20:07:21 PDT
ping...
Comment 5 Xianzhu Wang 2011-04-10 23:15:53 PDT
ping...
Comment 6 Tony Gentilcore 2011-04-11 20:04:11 PDT
Comment on attachment 85768 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=85768&action=review

> LayoutTests/ChangeLog:6
> +        https://bugs.webkit.org/show_bug.cgi?id=56360

You have good information in the first comment of the bug about why and how this fails. Usually it is best practice to put that information in the ChangeLog so that when people go back to understand why things are the way they are they can see it here instead of having to wade through the bug.
Comment 7 Xianzhu Wang 2011-04-11 20:29:09 PDT
Created attachment 89151 [details]
patch with updated ChangeLog
Comment 8 WebKit Commit Bot 2011-04-11 20:58:03 PDT
Comment on attachment 89151 [details]
patch with updated ChangeLog

Clearing flags on attachment: 89151

Committed r83554: <http://trac.webkit.org/changeset/83554>
Comment 9 WebKit Commit Bot 2011-04-11 20:58:11 PDT
All reviewed patches have been landed.  Closing bug.