Diff
Modified: trunk/LayoutTests/ChangeLog (273782 => 273783)
--- trunk/LayoutTests/ChangeLog 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/ChangeLog 2021-03-03 02:30:33 UTC (rev 273783)
@@ -1,5 +1,27 @@
2021-03-02 Chris Gambrell <[email protected]>
+ [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/anchor-download-attribute-content-disposition-no-extension-octet-stream.html:
+ * http/tests/download/anchor-download-attribute-content-disposition-no-extension-text-plain.html:
+ * http/tests/download/anchor-download-attribute-content-disposition.html:
+ * http/tests/download/basic-ascii-expected.txt:
+ * http/tests/download/basic-ascii.html:
+ * http/tests/download/resources/basic-ascii.php: Removed.
+ * http/tests/download/resources/basic-ascii.py: Added.
+ * http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.php: Removed.
+ * http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.py: Added.
+ * http/tests/download/resources/content-disposition-pass-no-extension-text-plain.php: Removed.
+ * http/tests/download/resources/content-disposition-pass-no-extension-text-plain.py: Added.
+ * http/tests/download/resources/content-disposition-pass.php: Removed.
+ * http/tests/download/resources/content-disposition-pass.py: Added.
+
+2021-03-02 Chris Gambrell <[email protected]>
+
[LayoutTests] Convert http/tests/history convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=222614
<rdar://problem/74946423>
Modified: trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition-no-extension-octet-stream.html (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition-no-extension-octet-stream.html 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition-no-extension-octet-stream.html 2021-03-03 02:30:33 UTC (rev 273783)
@@ -14,7 +14,7 @@
<body>
<p>Tests that the filename from the Content-Disposition header is used even if a download attribute is specified in HTML.</p>
<p>The suggested filename above should be "PASS" (without extension) and the download should succeed.</p>
-<a id="download-url" href="" download="FAIL.txt">Link with download attribute.</a>
+<a id="download-url" href="" download="FAIL.txt">Link with download attribute.</a>
<script>
function click(elmt)
{
Modified: trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition-no-extension-text-plain.html (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition-no-extension-text-plain.html 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition-no-extension-text-plain.html 2021-03-03 02:30:33 UTC (rev 273783)
@@ -14,7 +14,7 @@
<body>
<p>Tests that the filename from the Content-Disposition header is used even if a download attribute is specified in HTML.</p>
<p>The suggested filename above should be "PASS.txt" (with extension) and the download should succeed.</p>
-<a id="download-url" href="" download="FAIL.txt">Link with download attribute.</a>
+<a id="download-url" href="" download="FAIL.txt">Link with download attribute.</a>
<script>
function click(elmt)
{
Modified: trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/anchor-download-attribute-content-disposition.html 2021-03-03 02:30:33 UTC (rev 273783)
@@ -14,7 +14,7 @@
<body>
<p>Tests that the filename from the Content-Disposition header is used even if a download attribute is specified in HTML.</p>
<p>The suggested filename above should be "PASS.txt" and the download should succeed.</p>
-<a id="download-url" href="" download="FAIL.txt">Link with download attribute.</a>
+<a id="download-url" href="" download="FAIL.txt">Link with download attribute.</a>
<script>
function click(elmt)
{
Modified: trunk/LayoutTests/http/tests/download/basic-ascii-expected.txt (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/basic-ascii-expected.txt 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/basic-ascii-expected.txt 2021-03-03 02:30:33 UTC (rev 273783)
@@ -1,4 +1,4 @@
-Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/basic-ascii.php with navigation type 'other'
+Policy delegate: attempt to load http://127.0.0.1:8000/download/resources/basic-ascii.py with navigation type 'other'
Policy delegate: resource is an attachment, suggested file name 'test file.txt'
Download file name should be "test file.txt".
Modified: trunk/LayoutTests/http/tests/download/basic-ascii.html (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/basic-ascii.html 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/basic-ascii.html 2021-03-03 02:30:33 UTC (rev 273783)
@@ -6,4 +6,4 @@
}
</script>
<p>Download file name should be "test file.txt".</p>
-<iframe src=""
+<iframe src=""
Deleted: trunk/LayoutTests/http/tests/download/resources/basic-ascii.php (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/basic-ascii.php 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/resources/basic-ascii.php 2021-03-03 02:30:33 UTC (rev 273783)
@@ -1,6 +0,0 @@
-<?php
-header("Content-Disposition: attachment; filename=test file.txt");
-header("Content-Type: text/plain");
-?>
-
-Test file content.
Added: trunk/LayoutTests/http/tests/download/resources/basic-ascii.py (0 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/basic-ascii.py (rev 0)
+++ trunk/LayoutTests/http/tests/download/resources/basic-ascii.py 2021-03-03 02:30:33 UTC (rev 273783)
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Disposition: attachment; filename=test file.txt\r\n'
+ 'Content-Type: text/plain\r\n\r\n'
+ 'Test file content.\n'
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/download/resources/basic-ascii.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Deleted: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.php (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.php 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.php 2021-03-03 02:30:33 UTC (rev 273783)
@@ -1,6 +0,0 @@
-<?php
-header("Content-Disposition: Attachment; filename=PASS");
-header("Content-Type: application/octet-stream");
-?>
-
-Test file content.
Added: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.py (0 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.py (rev 0)
+++ trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.py 2021-03-03 02:30:33 UTC (rev 273783)
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Disposition: Attachment; filename=PASS\r\n'
+ 'Content-Type: application/octet-stream\r\n\r\n'
+ 'Test file content.\n'
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-octet-stream.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Deleted: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-text-plain.php (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-text-plain.php 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-text-plain.php 2021-03-03 02:30:33 UTC (rev 273783)
@@ -1,6 +0,0 @@
-<?php
-header("Content-Disposition: Attachment; filename=PASS");
-header("Content-Type: text/plain");
-?>
-
-Test file content.
Added: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-text-plain.py (0 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-text-plain.py (rev 0)
+++ trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-text-plain.py 2021-03-03 02:30:33 UTC (rev 273783)
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Disposition: Attachment; filename=PASS\r\n'
+ 'Content-Type: text/plain\r\n\r\n'
+ 'Test file content.\n'
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass-no-extension-text-plain.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Deleted: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass.php (273782 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/content-disposition-pass.php 2021-03-03 02:23:46 UTC (rev 273782)
+++ trunk/LayoutTests/http/tests/download/resources/content-disposition-pass.php 2021-03-03 02:30:33 UTC (rev 273783)
@@ -1,6 +0,0 @@
-<?php
-header("Content-Disposition: Attachment; filename=PASS.txt");
-header("Content-Type: text/plain");
-?>
-
-Test file content.
Added: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass.py (0 => 273783)
--- trunk/LayoutTests/http/tests/download/resources/content-disposition-pass.py (rev 0)
+++ trunk/LayoutTests/http/tests/download/resources/content-disposition-pass.py 2021-03-03 02:30:33 UTC (rev 273783)
@@ -0,0 +1,9 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Content-Disposition: Attachment; filename=PASS.txt\r\n'
+ 'Content-Type: text/plain\r\n\r\n'
+ 'Test file content.\n'
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/download/resources/content-disposition-pass.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property