RESOLVED FIXED 223234
[LayoutTests] Convert http/tests/referrer-policy convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=223234
Summary [LayoutTests] Convert http/tests/referrer-policy convert PHP to Python
Chris Gambrell
Reported 2021-03-15 20:00:35 PDT
Replacing PHP with equivalent Python CGI scripts
Attachments
Patch (59.89 KB, patch)
2021-03-15 20:04 PDT, Chris Gambrell
no flags
Patch (58.95 KB, patch)
2021-03-31 11:59 PDT, Chris Gambrell
no flags
Patch (72.38 KB, patch)
2021-03-31 14:07 PDT, Chris Gambrell
no flags
Patch (72.27 KB, patch)
2021-04-01 19:27 PDT, Chris Gambrell
jbedard: review+
ews-feeder: commit-queue-
Radar WebKit Bug Importer
Comment 1 2021-03-15 20:01:01 PDT
Chris Gambrell
Comment 2 2021-03-15 20:04:00 PDT
Chris Gambrell
Comment 3 2021-03-31 11:59:58 PDT
Chris Gambrell
Comment 4 2021-03-31 12:00:52 PDT
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
Chris Gambrell
Comment 5 2021-03-31 14:07:28 PDT
Chris Gambrell
Comment 6 2021-03-31 16:07:26 PDT
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
Jonathan Bedard
Comment 7 2021-04-01 08:35:07 PDT
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
Chris Gambrell
Comment 8 2021-04-01 19:27:20 PDT
Jonathan Bedard
Comment 9 2021-04-02 09:20:22 PDT
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
Chris Gambrell
Comment 10 2021-04-02 11:35:27 PDT
Note You need to log in before you can comment on or make changes to this bug.