Bug 223541 - [LayoutTests] Convert http/tests/resourceLoadStatistics convert PHP to Python
Summary: [LayoutTests] Convert http/tests/resourceLoadStatistics 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:
Blocks:
 
Reported: 2021-03-19 15:26 PDT by Chris Gambrell
Modified: 2021-04-15 19:47 PDT (History)
7 users (show)

See Also:


Attachments
Patch (26.02 KB, patch)
2021-03-19 15:29 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (26.04 KB, patch)
2021-03-21 06:12 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (97.29 KB, patch)
2021-03-22 07:11 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (95.60 KB, patch)
2021-03-22 13:38 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (95.71 KB, patch)
2021-03-24 07:50 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (95.71 KB, patch)
2021-03-24 12:29 PDT, Chris Gambrell
no flags Details | Formatted Diff | Diff
Patch (6.18 KB, patch)
2021-04-15 14:44 PDT, Chris Gambrell
no flags 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-19 15:26:07 PDT
Replacing PHP with equivalent Python CGI scripts
Comment 1 Radar WebKit Bug Importer 2021-03-19 15:26:28 PDT
<rdar://problem/75639142>
Comment 2 Chris Gambrell 2021-03-19 15:29:21 PDT
Created attachment 423784 [details]
Patch
Comment 3 Chris Gambrell 2021-03-21 06:12:35 PDT
Created attachment 423825 [details]
Patch
Comment 4 Chris Gambrell 2021-03-22 07:11:39 PDT
Created attachment 423879 [details]
Patch
Comment 5 Alex Christensen 2021-03-22 08:53:05 PDT
Comment on attachment 423879 [details]
Patch

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

> LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py:6
> +    'Cache-Control: no-store\r\n'

Doesn't python support """multi-line string literals"""?

> LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py:10
> +    '<head>\n'

ditto
Comment 6 Chris Gambrell 2021-03-22 13:38:39 PDT
Created attachment 423933 [details]
Patch
Comment 7 Chris Gambrell 2021-03-22 13:39:33 PDT
(In reply to Alex Christensen from comment #5)
> Comment on attachment 423879 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=423879&action=review
> 
> > LayoutTests/http/tests/resourceLoadStatistics/do-not-switch-session-on-navigation-to-prevalent-without-interaction.py:6
> > +    'Cache-Control: no-store\r\n'
> 
> Doesn't python support """multi-line string literals"""?
> 
> > LayoutTests/http/tests/resourceLoadStatistics/switch-session-on-navigation-to-prevalent-with-interaction.py:10
> > +    '<head>\n'
> 
> ditto

Fixed in comment 6
Comment 8 Chris Gambrell 2021-03-24 07:50:12 PDT
Created attachment 424134 [details]
Patch
Comment 9 Jonathan Bedard 2021-03-24 12:07:58 PDT
Comment on attachment 424134 [details]
Patch

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

> LayoutTests/http/tests/resourceLoadStatistics/resources/set-cookie-on-redirect.py:47
> +    )

Should add an "else" that writes \r\n to stdout so that if something breaks our assumptions here we will still have a valid response

> LayoutTests/http/tests/resourceLoadStatistics/resources/set-cookie.py:16
> +    'Set-Cookie: {}={}; expires={} GMT; Max-Age=2592000; path=/\r\n'

Have enough in here that I think naming your string arguments would be helpful.
Comment 10 Chris Gambrell 2021-03-24 12:29:15 PDT
Created attachment 424167 [details]
Patch
Comment 11 Chris Gambrell 2021-03-24 12:30:38 PDT
(In reply to Jonathan Bedard from comment #9)
> Comment on attachment 424134 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=424134&action=review
> 
> > LayoutTests/http/tests/resourceLoadStatistics/resources/set-cookie-on-redirect.py:47
> > +    )
> 
> Should add an "else" that writes \r\n to stdout so that if something breaks
> our assumptions here we will still have a valid response
> 
> > LayoutTests/http/tests/resourceLoadStatistics/resources/set-cookie.py:16
> > +    'Set-Cookie: {}={}; expires={} GMT; Max-Age=2592000; path=/\r\n'
> 
> Have enough in here that I think naming your string arguments would be
> helpful.

Fixed in comment 10
Comment 12 EWS 2021-03-24 14:32:42 PDT
Committed r274975: <https://commits.webkit.org/r274975>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424167 [details].
Comment 13 Chris Gambrell 2021-04-15 14:39:09 PDT
Reopening for last PHP file to convert to Python
Comment 14 Chris Gambrell 2021-04-15 14:44:39 PDT
Created attachment 426139 [details]
Patch
Comment 15 EWS 2021-04-15 19:47:07 PDT
Committed r276109 (236609@main): <https://commits.webkit.org/236609@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 426139 [details].