WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
75438
When showing results.html pass a correct URL to webbrowser.open
https://bugs.webkit.org/show_bug.cgi?id=75438
Summary
When showing results.html pass a correct URL to webbrowser.open
jochen
Reported
2012-01-02 08:48:18 PST
When showing results.html pass a correct URL to webbrowser.open
Attachments
Patch
(1.60 KB, patch)
2012-01-02 08:48 PST
,
jochen
no flags
Details
Formatted Diff
Diff
Patch
(7.70 KB, patch)
2012-01-03 05:21 PST
,
jochen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
jochen
Comment 1
2012-01-02 08:48:57 PST
Created
attachment 120882
[details]
Patch
jochen
Comment 2
2012-01-02 08:50:26 PST
Eric, can you please review? Without this patch, I get the following error on my Lion box: 2012-01-02 17:08:14.094 osascript[95311:f07] CFURLCreateWithString was passed this invalid URL string: '/Volumes/Data/WebKit/Source/WebKit/chromium/webkit/Debug/layout-test-results/results.html' (a file system path instead of an URL string). The URL created will not work with most file URL functions. CFURLCreateWithFileSystemPath or CFURLCreateWithFileSystemPathRelativeToBase should be used instead.
Eric Seidel (no email)
Comment 3
2012-01-02 09:53:29 PST
Comment on
attachment 120882
[details]
Patch It would be better to add this in a mockable fashion. like adding a file_url_for_path to FileSystem or just making open_url do this automatically? I'm surprised this only affects chromium?
Eric Seidel (no email)
Comment 4
2012-01-02 09:54:25 PST
I believe I've run the tests on Lion before and had it open the results correctly. So I'm surprised that this is a new issue?
Adam Barth
Comment 5
2012-01-02 10:45:33 PST
I've had the same problem. It seems to affect the Chromium port, not the Apple port.
Adam Barth
Comment 6
2012-01-02 10:46:00 PST
Comment on
attachment 120882
[details]
Patch Test?
jochen
Comment 7
2012-01-02 10:52:26 PST
Some ports override the show_results_html method. I was a bit hesitant to add this to open_url, because there might be other call sites that pass in correct URLs. I'd then first have to try to guess whether it's a filesystem path or already a valid URL. Adding file_path_as_url to FileSystem sounds like a good idea. I'll do that and write a test for it.
jochen
Comment 8
2012-01-03 05:21:21 PST
Created
attachment 120936
[details]
Patch
Adam Barth
Comment 9
2012-01-03 11:46:38 PST
Comment on
attachment 120936
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=120936&action=review
> Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:66 > + self.assertEqual(fs.file_path_as_url('/foo'), > + 'file:///foo')
Is this going to pass on Windows?
jochen
Comment 10
2012-01-03 11:57:07 PST
(In reply to
comment #9
)
> (From update of
attachment 120936
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=120936&action=review
> > > Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:66 > > + self.assertEqual(fs.file_path_as_url('/foo'), > > + 'file:///foo') > > Is this going to pass on Windows?
I don't know. I don't have a windows checkout of webkit handy to try and no bots execute those tests :-/
Eric Seidel (no email)
Comment 11
2012-01-03 11:58:01 PST
(In reply to
comment #10
)
> (In reply to
comment #9
) > > (From update of
attachment 120936
[details]
[details]) > > View in context:
https://bugs.webkit.org/attachment.cgi?id=120936&action=review
> > > > > Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:66 > > > + self.assertEqual(fs.file_path_as_url('/foo'), > > > + 'file:///foo') > > > > Is this going to pass on Windows? > > I don't know. I don't have a windows checkout of webkit handy to try and no bots execute those tests :-/
All the bots execute tehse tests. :) I don't think the EWS bots do today... but they used to.
jochen
Comment 12
2012-01-03 12:14:05 PST
(In reply to
comment #11
)
> (In reply to
comment #10
) > > (In reply to
comment #9
) > > > (From update of
attachment 120936
[details]
[details] [details]) > > > View in context:
https://bugs.webkit.org/attachment.cgi?id=120936&action=review
> > > > > > > Tools/Scripts/webkitpy/common/system/filesystem_unittest.py:66 > > > > + self.assertEqual(fs.file_path_as_url('/foo'), > > > > + 'file:///foo') > > > > > > Is this going to pass on Windows? > > > > I don't know. I don't have a windows checkout of webkit handy to try and no bots execute those tests :-/ > > All the bots execute tehse tests. :) I don't think the EWS bots do today... but they used to.
ah, ok, I was mistaken, just the slow scm tests aren't executed. I'll watch the buildbots for the result then
WebKit Review Bot
Comment 13
2012-01-03 16:18:44 PST
Comment on
attachment 120936
[details]
Patch Clearing flags on attachment: 120936 Committed
r103984
: <
http://trac.webkit.org/changeset/103984
>
WebKit Review Bot
Comment 14
2012-01-03 16:18:49 PST
All reviewed patches have been landed. Closing bug.
Dirk Pranke
Comment 15
2012-01-04 13:08:31 PST
Hm. We already had a path module in webkitpy.common.system that provided an abspath_to_uri() method that did the same thing. It's not clear to me that this should really live on filesystem instead (although at least that would give you predictable behavior using a mock filesystem on windows) but we probably shouldn't have both.
jochen
Comment 16
2012-01-04 13:10:47 PST
(In reply to
comment #15
)
> Hm. We already had a path module in webkitpy.common.system that provided an abspath_to_uri() method that did the same thing. It's not clear to me that this should really live on filesystem instead (although at least that would give you predictable behavior using a mock filesystem on windows) but we probably shouldn't have both.
Oh, I didn't see that I'll try to come up with a way to unify this
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug