Summary: | DumpRenderTree Resources out of Order causes failures in tests | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Simon Hollingshead <me> | ||||||
Component: | Tools / Tests | Assignee: | Brady Eidson <beidson> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | beidson | ||||||
Priority: | P2 | ||||||||
Version: | 528+ (Nightly build) | ||||||||
Hardware: | Mac | ||||||||
OS: | All | ||||||||
Attachments: |
|
Description
Simon Hollingshead
2008-04-03 10:29:18 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 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.
Created attachment 20408 [details]
Proposed fix, and 3 updated layout tests
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
Landed in 31722 |