Bug 222618 - [LayoutTests] Convert http/tests/download convert PHP to Python
Summary: [LayoutTests] Convert http/tests/download convert PHP to Python
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Gambrell
URL:
Keywords: InRadar
Depends on: 224046
Blocks:
  Show dependency treegraph
 
Reported: 2021-03-02 14:32 PST by Chris Gambrell
Modified: 2021-04-01 14:12 PDT (History)
8 users (show)

See Also:


Attachments
Patch (10.93 KB, patch)
2021-03-02 14:33 PST, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (9.44 KB, patch)
2021-03-30 19:32 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (9.41 KB, patch)
2021-03-31 10:40 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (9.39 KB, patch)
2021-04-01 11:59 PDT, Chris Gambrell
jbedard: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Gambrell 2021-03-02 14:32:11 PST
Replacing PHP with equivalent Python CGI scripts
Comment 1 Radar WebKit Bug Importer 2021-03-02 14:32:30 PST
<rdar://problem/74949253>
Comment 2 Chris Gambrell 2021-03-02 14:33:41 PST
Created attachment 421998 [details]
Patch
Comment 3 EWS 2021-03-02 18:30:38 PST
Committed r273783: <https://commits.webkit.org/r273783>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 421998 [details].
Comment 4 Chris Gambrell 2021-03-30 19:29:51 PDT
Reopening to finish directory:
- LayoutTests/http/tests/download/resources/literal-koi8-r.php
- LayoutTests/http/tests/download/resources/literal-utf-8.php
Comment 5 Chris Gambrell 2021-03-30 19:32:37 PDT
Created attachment 424726 [details]
Patch
Comment 6 Chris Gambrell 2021-03-30 19:36:11 PDT
(In reply to Chris Gambrell from comment #5)
> Created attachment 424726 [details]
> Patch

This patch may have the same issues going through EWS similar to Bug 223522 due to encoding issues
Comment 7 Alexey Proskuryakov 2021-03-30 23:11:03 PDT
Comment on attachment 424726 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424726&action=review

> LayoutTests/http/tests/download/resources/literal-utf-8.py:6
> +    'Content-Disposition: attachment; filename=SU{}SS.txt\r\n'

This doesn't look like the same filename?
Comment 8 Chris Gambrell 2021-03-31 10:40:23 PDT
Created attachment 424787 [details]
Patch
Comment 9 Chris Gambrell 2021-03-31 10:41:23 PDT
(In reply to Alexey Proskuryakov from comment #7)
> Comment on attachment 424726 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=424726&action=review
> 
> > LayoutTests/http/tests/download/resources/literal-utf-8.py:6
> > +    'Content-Disposition: attachment; filename=SU{}SS.txt\r\n'
> 
> This doesn't look like the same filename?

Moved the encoded parts to their own statement
Comment 10 Jonathan Bedard 2021-03-31 10:53:46 PDT
Comment on attachment 424787 [details]
Patch

Looks good, but let's let EWS chew on it for a bit.
Comment 11 Chris Gambrell 2021-03-31 11:11:18 PDT
(In reply to Jonathan Bedard from comment #10)
> Comment on attachment 424787 [details]
> Patch
> 
> Looks good, but let's let EWS chew on it for a bit.

EWS will be unable to process this patch because of the issue in Bug 223525. Manually committing and bypassing EWS
Comment 12 Chris Gambrell 2021-03-31 11:14:28 PDT
Committed r275295 (235976@main): <https://commits.webkit.org/235976@main>
Comment 13 Aakash Jain 2021-04-01 06:30:53 PDT
(In reply to Chris Gambrell from comment #12)
> Committed r275295 (235976@main): <https://commits.webkit.org/235976@main>
This seems to have broken following tests on mac wk1:

http/tests/download/default-encoding.html
http/tests/download/inherited-encoding-form-submission-result.html
http/tests/download/inherited-encoding.html

History: https://results.webkit.org/?suite=layout-tests&suite=layout-tests&suite=layout-tests&test=http%2Ftests%2Fdownload%2Fdefault-encoding.html&test=http%2Ftests%2Fdownload%2Finherited-encoding-form-submission-result.html&test=http%2Ftests%2Fdownload%2Finherited-encoding.html
Comment 14 Aakash Jain 2021-04-01 06:30:58 PDT
From https://ews-build.s3-us-west-2.amazonaws.com/macOS-Catalina-Release-WK1-Tests-EWS/r424868-4919-clean-tree/http/tests/download/default-encoding-diff.txt
-Policy delegate: resource is an attachment, suggested file name 'SUССЕSS.txt'
+Policy delegate: resource is an attachment, suggested file name 'SU���SS.txt'
Comment 15 WebKit Commit Bot 2021-04-01 06:32:08 PDT
Re-opened since this is blocked by bug 224046
Comment 16 Chris Gambrell 2021-04-01 11:59:45 PDT
Created attachment 424923 [details]
Patch
Comment 17 Chris Gambrell 2021-04-01 12:01:02 PDT
Comment on attachment 424923 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424923&action=review

> LayoutTests/http/tests/download/resources/literal-koi8-r.py:5
> +sys.stdout.write('Content-Disposition: attachment; filename=SU\xf3\xf3\xe5SS.txt\r\n'.encode('latin-1').decode('koi8-r', 'replace'))

Decoding as koi8-r now instead of utf-8
Comment 18 Chris Gambrell 2021-04-01 14:12:35 PDT
Committed r275380 (236048@main): <https://commits.webkit.org/236048@main>