Summary: | [LayoutTests] Convert http/tests/navigation 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-02-25 08:07:27 PST
Created attachment 421527 [details]
Patch
Created attachment 421876 [details]
Patch
Created attachment 421879 [details]
Patch
Created attachment 421880 [details]
Patch
Created attachment 421885 [details]
Patch
Created attachment 421891 [details]
Patch
Comment on attachment 421891 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=421891&action=review > LayoutTests/http/tests/navigation/post-redirect-get-reload.py:15 > +else: Can we do an early exit instead of an else here? > LayoutTests/http/tests/navigation/resources/redirect-on-back-updates-history-item.py:27 > + sys.stdout.write( Can we do an early exit instead of else here? > LayoutTests/http/tests/navigation/resources/redirect-on-reload-updates-history-item.py:63 > + ) Nit: Extra whitespace here > LayoutTests/http/tests/navigation/resources/randomredirects/0.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue This should be '5:' I think this will be easier if you just check the environment for 'HTTP_IF_MODIFIED_SINCE' in line 12 and ditch this loop entirely. > LayoutTests/http/tests/navigation/resources/randomredirects/1.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/2.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/3.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/4.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/5.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/6.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/7.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/8.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. > LayoutTests/http/tests/navigation/resources/randomredirects/9.py:10 > + headers[headername[4:].lower().replace('_', '-')] = headervalue Ditto. Created attachment 421997 [details]
Patch
Committed r273781: <https://commits.webkit.org/r273781> All reviewed patches have been landed. Closing bug and clearing flags on attachment 421997 [details]. Reopening for second pass at .php files Created attachment 425165 [details]
Patch
Created attachment 425174 [details]
Patch
Comment on attachment 425174 [details]
Patch
There were issues with apply-patch and the files
* LayoutTests/http/tests/navigation/no-referrer-reset.html
* LayoutTests/http/tests/navigation/no-referrer-same-window.html
* LayoutTests/http/tests/navigation/no-referrer-subframe.html
* LayoutTests/http/tests/navigation/no-referrer-target-blank.html
which contains the new py files
* LayoutTests/http/tests/navigation/resources/no-referrer-reset-helper.py
* LayoutTests/http/tests/navigation/resources/no-referrer-same-window-helper.py
* LayoutTests/http/tests/navigation/resources/no-referrer-helper.py
Reverted the tests for now back to the original with the .php versions of the scripts but also included the .py files for review. macwk1, macwk2, and iOS all pass locally on my machine with the new py versions.
Once r+ I will change the tests back to the .py versions and remove the .php files to keep apply-patch happy.
Comment on attachment 425174 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=425174&action=review > LayoutTests/http/tests/navigation/resources/check-ping.py:10 > +sys.path.insert(0, http_root) I don't see us using this. > LayoutTests/http/tests/navigation/resources/delete-ping.py:9 > +sys.path.insert(0, http_root) I don't see us using this. > LayoutTests/http/tests/navigation/resources/no-referrer-helper.py:1 > +#!/usr/bin/env python3 Are we still using http/tests/navigation/resources/no-referrer-helper.php? > LayoutTests/http/tests/navigation/resources/no-referrer-reset-helper.py:1 > +#!/usr/bin/env python3 Are we still using http/tests/navigation/resources/no-referrer-reset-helper.php? > LayoutTests/http/tests/navigation/resources/no-referrer-same-window-helper.py:1 > +#!/usr/bin/env python3 Are we still using http/tests/navigation/resources/no-referrer-same-window-helper.php? > LayoutTests/http/tests/navigation/resources/ping_file_path.py:10 > +sys.path.insert(0, http_root) I don't see us using this. > LayoutTests/http/tests/navigation/resources/redirected-post-request-contents.py:40 > +if content is not None and content == 'true': Can just do "content == 'true'" Created attachment 425532 [details]
Patch
(In reply to Jonathan Bedard from comment #15) > Comment on attachment 425174 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=425174&action=review > > > LayoutTests/http/tests/navigation/resources/check-ping.py:10 > > +sys.path.insert(0, http_root) > > I don't see us using this. > > > LayoutTests/http/tests/navigation/resources/delete-ping.py:9 > > +sys.path.insert(0, http_root) > > I don't see us using this. > > > LayoutTests/http/tests/navigation/resources/no-referrer-helper.py:1 > > +#!/usr/bin/env python3 > > Are we still using http/tests/navigation/resources/no-referrer-helper.php? > > > LayoutTests/http/tests/navigation/resources/no-referrer-reset-helper.py:1 > > +#!/usr/bin/env python3 > > Are we still using > http/tests/navigation/resources/no-referrer-reset-helper.php? > > > LayoutTests/http/tests/navigation/resources/no-referrer-same-window-helper.py:1 > > +#!/usr/bin/env python3 > > Are we still using > http/tests/navigation/resources/no-referrer-same-window-helper.php? > > > LayoutTests/http/tests/navigation/resources/ping_file_path.py:10 > > +sys.path.insert(0, http_root) > > I don't see us using this. > > > LayoutTests/http/tests/navigation/resources/redirected-post-request-contents.py:40 > > +if content is not None and content == 'true': > > Can just do "content == 'true'" See comment 14 for why some PHP have not yet been removed Committed r275677 (236313@main): <https://commits.webkit.org/236313@main> |