Bug 18302

Summary: DumpRenderTree Resources out of Order causes failures in tests
Product: WebKit Reporter: Simon Hollingshead <me>
Component: Tools / TestsAssignee: Brady Eidson <beidson>
Status: RESOLVED FIXED    
Severity: Normal CC: beidson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: All   
Attachments:
Description Flags
Example of the diffs within a test where two resources are recieved in the opposite order.
none
Proposed fix, and 3 updated layout tests mitz: review+

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