Bug 18302 - DumpRenderTree Resources out of Order causes failures in tests
Summary: DumpRenderTree Resources out of Order causes failures in tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-03 10:29 PDT by Simon Hollingshead
Modified: 2008-04-08 10:31 PDT (History)
1 user (show)

See Also:


Attachments
Example of the diffs within a test where two resources are recieved in the opposite order. (1.93 KB, text/plain)
2008-04-03 10:30 PDT, Simon Hollingshead
no flags Details
Proposed fix, and 3 updated layout tests (12.67 KB, patch)
2008-04-08 10:11 PDT, Brady Eidson
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Hollingshead 2008-04-03 10:29:18 PDT
One test, the webarchive/test-css-import.html one, appears to fail on my system.  This is not because anything is incorrect, but simply because the files are received in the opposite order as to how they are expected.  This occurs on some systems only, such as within chat:
<bradee-oh> ah!  on my Mac Pro I get the out-of-orderness, but not on my MacBookPro
Comment 1 Simon Hollingshead 2008-04-03 10:30:47 PDT
Created attachment 20314 [details]
Example of the diffs within a test where two resources are recieved in the opposite order.

Added example from Dump Render Tree.
Comment 2 Simon Hollingshead 2008-04-04 07:43:45 PDT
Comment on attachment 20314 [details]
Example of the diffs within a test where two resources are recieved in the opposite order.

Placed space in description where accidentally omitted previously.
Comment 3 Brady Eidson 2008-04-08 10:11:00 PDT
Created attachment 20408 [details]
Proposed fix, and 3 updated layout tests
Comment 4 mitz 2008-04-08 10:27:24 PDT
Comment on attachment 20408 [details]
Proposed fix, and 3 updated layout tests

+static NSInteger resourceURLSort(id resource1, id resource2, void *reverse)

I'd really prefer the name compareResourceURLs.

+        if (NSArray* newSubresource = [subresources sortedArrayUsingFunction:resourceURLSort context:&reverseSort])

The * should go next to newSubresource, which I'd call "newSubresourceS" or "sortedSubresources".

Since the compare function does not use the context argument ("reverse"), just pass 0, and don't call it "reverse".

r=me but please try to address some of my comments
Comment 5 Brady Eidson 2008-04-08 10:31:18 PDT
Landed in 31722