[webkit-reviews] review granted: [Bug 135929] import-w3c-tests doesn't handle relative paths to support files in ref files correctly : [Attachment 237877] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 10 08:29:01 PDT 2014
Bem Jones-Bey <bjonesbe at adobe.com> has granted Rebecca Hauck
<rhauck at adobe.com>'s request for review:
Bug 135929: import-w3c-tests doesn't handle relative paths to support files in
ref files correctly
https://bugs.webkit.org/show_bug.cgi?id=135929
Attachment 237877: Patch
https://bugs.webkit.org/attachment.cgi?id=237877&action=review
------- Additional Comments from Bem Jones-Bey <bjonesbe at adobe.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=237877&action=review
r=me, but please make the following updates before landing
> Tools/Scripts/webkitpy/w3c/test_converter.py:149
> + else:
WebKit style is to omit this else.
> Tools/Scripts/webkitpy/w3c/test_converter.py:172
> + if attr_name == 'src' and attr_value in
self.reference_support_info['files']:
> + converted = self.convert_reference_relpaths(attr_value)
You're walking through reference_support_info['files'] twice in this situation.
Either remove the check here ("and attr_value in
self.reference_support_info['files']"), or create a more specific helper
function to do the replacement, and call that both from here and from
convert_reference_relpaths.
> Tools/Scripts/webkitpy/w3c/test_parser.py:141
> + if not(path.startswith('http:')) and
not(path.startswith('mailto:')) and not(path.startswith('data:')):
This is fragile, I think it would be better to do:
uri_scheme_pattern = re.compile(r"[A-Za-z][A-Za-z+.-]*:");
if uri_scheme_pattern.match(path):
I got the pattern from: http://tools.ietf.org/html/rfc3986#section-3.1
It will also match paths that start with a windows drive letter, but I'm pretty
sure that such platform specific paths won't end up in the W3C repos. :-)
More information about the webkit-reviews
mailing list