Title: [275295] trunk/LayoutTests
Revision
275295
Author
cgambr...@apple.com
Date
2021-03-31 11:14:23 -0700 (Wed, 31 Mar 2021)

Log Message

[LayoutTests] Convert http/tests/download convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=222618
<rdar://problem/74949253>

Reviewed by Jonathan Bedard.

* http/tests/download/default-encoding-expected.txt:
* http/tests/download/default-encoding.html:
* http/tests/download/inherited-encoding-expected.txt:
* http/tests/download/inherited-encoding-form-submission-result-expected.txt:
* http/tests/download/inherited-encoding-form-submission-result.html:
* http/tests/download/inherited-encoding.html:
* http/tests/download/literal-utf-8-expected.txt:
* http/tests/download/literal-utf-8.html:
* http/tests/download/resources/literal-koi8-r.php: Removed.
* http/tests/download/resources/literal-koi8-r.py: Added.
* http/tests/download/resources/literal-utf-8.php: Removed.
* http/tests/download/resources/literal-utf-8.py: Added.

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (275294 => 275295)


--- trunk/LayoutTests/ChangeLog	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/ChangeLog	2021-03-31 18:14:23 UTC (rev 275295)
@@ -1,3 +1,24 @@
+2021-03-31  Chris Gambrell  <cgambr...@apple.com>
+
+        [LayoutTests] Convert http/tests/download convert PHP to Python
+        https://bugs.webkit.org/show_bug.cgi?id=222618
+        <rdar://problem/74949253>
+
+        Reviewed by Jonathan Bedard.
+
+        * http/tests/download/default-encoding-expected.txt:
+        * http/tests/download/default-encoding.html:
+        * http/tests/download/inherited-encoding-expected.txt:
+        * http/tests/download/inherited-encoding-form-submission-result-expected.txt:
+        * http/tests/download/inherited-encoding-form-submission-result.html:
+        * http/tests/download/inherited-encoding.html:
+        * http/tests/download/literal-utf-8-expected.txt:
+        * http/tests/download/literal-utf-8.html:
+        * http/tests/download/resources/literal-koi8-r.php: Removed.
+        * http/tests/download/resources/literal-koi8-r.py: Added.
+        * http/tests/download/resources/literal-utf-8.php: Removed.
+        * http/tests/download/resources/literal-utf-8.py: Added.
+
 2021-03-31  Antti Koivisto  <an...@apple.com>
 
         Animated pseudo element style resolved against wrong parent style

Modified: trunk/LayoutTests/http/tests/download/default-encoding-expected.txt (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/default-encoding-expected.txt	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/default-encoding-expected.txt	2021-03-31 18:14:23 UTC (rev 275295)
@@ -1,4 +1,4 @@
-Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-koi8-r.php with navigation type 'link clicked' originating from #text > A > BODY > HTML > #document
+Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-koi8-r.py with navigation type 'link clicked' originating from #text > A > BODY > HTML > #document
 Policy delegate: resource is an attachment, suggested file name 'SUССЕSS.txt'
 Downloaded file name should be "SUССЕSS.txt" (letters "CCE" are Cyrillic).
 

Modified: trunk/LayoutTests/http/tests/download/default-encoding.html (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/default-encoding.html	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/default-encoding.html	2021-03-31 18:14:23 UTC (rev 275295)
@@ -8,7 +8,7 @@
 }
 </script>
 <p>Downloaded file name should be "SUССЕSS.txt" (letters "CCE" are Cyrillic).</p>
-<a href="" id=link>Click Me</a>
+<a href="" id=link>Click Me</a>
 
 <script>
 if (window.eventSender) {

Modified: trunk/LayoutTests/http/tests/download/inherited-encoding-expected.txt (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/inherited-encoding-expected.txt	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/inherited-encoding-expected.txt	2021-03-31 18:14:23 UTC (rev 275295)
@@ -1,4 +1,4 @@
-Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-koi8-r.php with navigation type 'link clicked' originating from #text > A > BODY > HTML > #document
+Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-koi8-r.py with navigation type 'link clicked' originating from #text > A > BODY > HTML > #document
 Policy delegate: resource is an attachment, suggested file name 'SUССЕSS.txt'
 Downloaded file name should be "SUССЕSS.txt" (letters "CCE" are Cyrillic).
 

Modified: trunk/LayoutTests/http/tests/download/inherited-encoding-form-submission-result-expected.txt (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/inherited-encoding-form-submission-result-expected.txt	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/inherited-encoding-form-submission-result-expected.txt	2021-03-31 18:14:23 UTC (rev 275295)
@@ -1,4 +1,4 @@
-Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-koi8-r.php? with navigation type 'form submitted'
+Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-koi8-r.py? with navigation type 'form submitted'
 Policy delegate: resource is an attachment, suggested file name 'SUССЕSS.txt'
 Downloaded file name should be "SUССЕSS.txt" (letters "CCE" are Cyrillic).
 

Modified: trunk/LayoutTests/http/tests/download/inherited-encoding-form-submission-result.html (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/inherited-encoding-form-submission-result.html	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/inherited-encoding-form-submission-result.html	2021-03-31 18:14:23 UTC (rev 275295)
@@ -7,7 +7,7 @@
 }
 </script>
 <p>Downloaded file name should be "SU\xF3\xF3\xE5SS.txt" (letters "CCE" are Cyrillic).</p>
-<form action=""
+<form action=""
 </form>
 
 <script>

Modified: trunk/LayoutTests/http/tests/download/inherited-encoding.html (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/inherited-encoding.html	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/inherited-encoding.html	2021-03-31 18:14:23 UTC (rev 275295)
@@ -7,7 +7,7 @@
 }
 </script>
 <p>Downloaded file name should be "SU\xF3\xF3\xE5SS.txt" (letters "CCE" are Cyrillic).</p>
-<a href="" id=link>Click Me</a>
+<a href="" id=link>Click Me</a>
 
 <script>
 if (window.eventSender) {

Modified: trunk/LayoutTests/http/tests/download/literal-utf-8-expected.txt (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/literal-utf-8-expected.txt	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/literal-utf-8-expected.txt	2021-03-31 18:14:23 UTC (rev 275295)
@@ -1,4 +1,4 @@
-Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-utf-8.php with navigation type 'other'
+Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/literal-utf-8.py with navigation type 'other'
 Policy delegate: resource is an attachment, suggested file name 'SUССЕSS.txt'
 Downloaded file name should be "SUССЕSS.txt" (letters "CCE" are Cyrillic).
 

Modified: trunk/LayoutTests/http/tests/download/literal-utf-8.html (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/literal-utf-8.html	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/literal-utf-8.html	2021-03-31 18:14:23 UTC (rev 275295)
@@ -6,4 +6,4 @@
 }
 </script>
 <p>Downloaded file name should be "SU\xF3\xF3\xE5SS.txt" (letters "CCE" are Cyrillic).</p>
-<iframe src=""
+<iframe src=""

Deleted: trunk/LayoutTests/http/tests/download/resources/literal-koi8-r.php (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/resources/literal-koi8-r.php	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/resources/literal-koi8-r.php	2021-03-31 18:14:23 UTC (rev 275295)
@@ -1,6 +0,0 @@
-<?php
-header("Content-Disposition: attachment; filename=SU\xf3\xf3\xe5SS.txt");
-header("Content-Type: text/plain; charset=windows-1251"); // Content-Type charset does not affect header charset.
-?>
-
-Test file content.

Added: trunk/LayoutTests/http/tests/download/resources/literal-koi8-r.py (0 => 275295)


--- trunk/LayoutTests/http/tests/download/resources/literal-koi8-r.py	                        (rev 0)
+++ trunk/LayoutTests/http/tests/download/resources/literal-koi8-r.py	2021-03-31 18:14:23 UTC (rev 275295)
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write('Content-Disposition: attachment; filename=SU\xf3\xf3\xe5SS.txt\r\n'.encode('latin-1').decode('utf-8', 'replace'))
+sys.stdout.write(
+    'Content-Type: text/plain; charset=windows-1251\r\n\r\n'
+    'Test file content.'
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/download/resources/literal-koi8-r.py
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property

Deleted: trunk/LayoutTests/http/tests/download/resources/literal-utf-8.php (275294 => 275295)


--- trunk/LayoutTests/http/tests/download/resources/literal-utf-8.php	2021-03-31 18:13:03 UTC (rev 275294)
+++ trunk/LayoutTests/http/tests/download/resources/literal-utf-8.php	2021-03-31 18:14:23 UTC (rev 275295)
@@ -1,6 +0,0 @@
-<?php
-header("Content-Disposition: attachment; filename=SU\xd0\xa1\xd0\xa1\xd0\x95SS.txt");
-header("Content-Type: text/plain; charset=koi8-r"); // Content-Type charset does not affect header charset.
-?>
-
-Test file content.

Added: trunk/LayoutTests/http/tests/download/resources/literal-utf-8.py (0 => 275295)


--- trunk/LayoutTests/http/tests/download/resources/literal-utf-8.py	                        (rev 0)
+++ trunk/LayoutTests/http/tests/download/resources/literal-utf-8.py	2021-03-31 18:14:23 UTC (rev 275295)
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write('Content-Disposition: attachment; filename=SU\xd0\xa1\xd0\xa1\xd0\x95SS.txt\r\n'.encode('latin-1').decode('utf-8', 'replace'))
+sys.stdout.write(
+    'Content-Type: text/plain; charset=koi8-r\r\n\r\n'
+    'Test file content.'
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/download/resources/literal-utf-8.py
___________________________________________________________________

Added: svn:executable

+* \ No newline at end of property
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to