Summary: | [LayoutTests] Convert http/tests/referrer-policy convert PHP to Python | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Gambrell <cgambrell> | ||||||||||
Component: | Tools / Tests | Assignee: | Chris Gambrell <cgambrell> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | ap, ews-watchlist, hi, jbedard, mkwst, ryanhaddad, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=220749 | ||||||||||||
Attachments: |
|
Description
Chris Gambrell
2021-03-15 20:00:35 PDT
Created attachment 423286 [details]
Patch
Created attachment 424797 [details]
Patch
Comment on attachment 424797 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424797&action=review > LayoutTests/ChangeLog:69 > + * http/tests/referrer-policy/resources/script.php: Removed. File not used by any tests Created attachment 424819 [details]
Patch
Comment on attachment 424819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424819&action=review > LayoutTests/http/tests/navigation/ping-attribute/resources/utilities.js:-29 > - xhr.open("GET", "../../resources/delete-ping.php", true /* async */); Referred to http/tests/resources/delete-ping.php instead of http/tests/navigation/resources/delete-ping.php Comment on attachment 424819 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424819&action=review > LayoutTests/http/tests/css/resources/webfont-request.py:9 > +http_root = os.path.dirname(os.path.dirname(os.path.abspath(os.path.dirname(file)))) I don't see us using this path > LayoutTests/http/tests/referrer-policy/resources/image.py:17 > +with open(os.path.join('/'.join(__file__.split('/')[0:-1]), '../../security/contentSecurityPolicy/block-all-mixed-content/resources/red-square.png'), 'rb') as file: Should use os.path.abspath(...) after os.path.join(...) > LayoutTests/http/tests/websocket/tests/hybi/contentextensions/block-cookies-worker.py.json:16 > +]''') I would do this instead: print(json.dumps([{ 'action': {'type': 'block-cookies'}, 'trigger': {'url-filter': '8880'}, }], indent=4) That way you don't have to worry about encoding JSON correctly > LayoutTests/http/tests/websocket/tests/hybi/contentextensions/block-cookies.py.json:16 > +]''') Ditto on manually encoding json Created attachment 424975 [details]
Patch
Comment on attachment 424975 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=424975&action=review > LayoutTests/http/tests/css/resources/webfont-request.py:8 > +file = __file__.split(':/cygwin')[-1] Doesn't look like we're using this Committed r275427 (236090@main): <https://commits.webkit.org/236090@main> |