Summary: | [Mac] _drt_descriptionSuitableForTestResult generate an exception for absolute paths above the main frame | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Benjamin Poulain <benjamin> | ||||
Component: | Tools / Tests | Assignee: | Benjamin Poulain <benjamin> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | darin, joepeck, webkit.review.bot | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Benjamin Poulain
2011-11-01 17:29:09 PDT
Created attachment 113266 [details]
Patch
Comment on attachment 113266 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113266&action=review > LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt:12 > +file:///test.png - didReceiveResponse <NSURLResponse file:///Users/pecoraro/Desktop/test.png, http status code 0> That's not good. It has the patch of a user’s home directory! Comment on attachment 113266 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113266&action=review >> LayoutTests/webarchive/loading/test-loading-archive-subresource-null-mimetype-expected.txt:12 >> +file:///test.png - didReceiveResponse <NSURLResponse file:///Users/pecoraro/Desktop/test.png, http status code 0> > > That's not good. It has the patch of a user’s home directory! The path of a specific users’s home directory. We can}t have that in expected test results. My user directly is definitely not /Users/pecoraro/ :) This the path of the source as encoded in the webarchive. s/user directly/user directory (In reply to comment #4) > This the path of the source as encoded in the webarchive. OK, makes sense. I looked in the web archive and couldn’t find that, but it was because it was in the Base64-encoded WebResourceResponse data. Comment on attachment 113266 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=113266&action=review > Tools/DumpRenderTree/mac/ResourceLoadDelegate.mm:89 > + if ([[self path] hasPrefix:basePath]) { > + ASSERT([[self path] length] >= ([basePath length] + 1)); > + return [[self path] substringFromIndex:[basePath length] + 1]; > + } We could also write this code so that it appends a "/" to basePath first, then we would not need the assertion or the "+ 1". (In reply to comment #4) > My user directly is definitely not /Users/pecoraro/ :) > > This the path of the source as encoded in the webarchive. Feel free to update the webarchive. I didn't know this data was inside it, otherwise I wouldn't have included it originally =(. Comment on attachment 113266 [details] Patch Clearing flags on attachment: 113266 Committed r99031: <http://trac.webkit.org/changeset/99031> All reviewed patches have been landed. Closing bug. |