Diff
Modified: trunk/LayoutTests/ChangeLog (273744 => 273745)
--- trunk/LayoutTests/ChangeLog 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/ChangeLog 2021-03-02 19:19:44 UTC (rev 273745)
@@ -1,3 +1,23 @@
+2021-03-02 Chris Gambrell <[email protected]>
+
+ [LayoutTests] Convert http/tests/uri convert PHP to Python
+ https://bugs.webkit.org/show_bug.cgi?id=222599
+ <rdar://problem/74929709>
+
+ Reviewed by Jonathan Bedard.
+
+ * http/tests/uri/css-href.php: Removed.
+ * http/tests/uri/css-href.py: Added.
+ * http/tests/uri/curly-braces-escaping-expected.txt:
+ * http/tests/uri/curly-braces-escaping.html:
+ * http/tests/uri/intercept/.htaccess:
+ * http/tests/uri/resources/echo-uri.php: Removed.
+ * http/tests/uri/resources/echo-uri.py: Added.
+ * http/tests/uri/resources/print-uri.php: Removed.
+ * http/tests/uri/resources/print-uri.py: Added.
+ * platform/ios-wk2/TestExpectations:
+ * platform/ios/TestExpectations:
+
2021-03-02 Youenn Fablet <[email protected]>
Enable MEDIA_SOURCE in IOS Simulator
Deleted: trunk/LayoutTests/http/tests/uri/css-href.php (273744 => 273745)
--- trunk/LayoutTests/http/tests/uri/css-href.php 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/http/tests/uri/css-href.php 2021-03-02 19:19:44 UTC (rev 273745)
@@ -1,18 +0,0 @@
-<html>
- <head>
- <base href="" echo 'http://' . $_SERVER['HTTP_HOST'] . '/uri/resources/'; ?>">
- <style>
- @import 'css-href.css';
- </style>
- </head>
- <body>
- <p>Test for <a href="" 11141</a>:
- CSS '@import' doesn't respect HTML Base element.</p>
- <p class="c1">This text should be green.</p>
- <p>If it is red, the css has been loaded relative to the document.
- If it is black, no stylesheet has been rendered, if it is rendered green,
- the stylesheet has been rendered correctly from the HREF attribute of the
- Base element in the HEAD section of this document.</p>
- <p class="c2">This text should also be green.</p>
- </body>
-</html>
Added: trunk/LayoutTests/http/tests/uri/css-href.py (0 => 273745)
--- trunk/LayoutTests/http/tests/uri/css-href.py (rev 0)
+++ trunk/LayoutTests/http/tests/uri/css-href.py 2021-03-02 19:19:44 UTC (rev 273745)
@@ -0,0 +1,28 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+host = os.environ.get('HTTP_HOST', '')
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ '<html>\n'
+ ' <head>\n'
+ ' <base href=""
+ ' <style>\n'
+ ' @import \'css-href.css\';\n'
+ ' </style>\n'
+ ' </head>\n'
+ ' <body>\n'
+ ' <p>Test for <a href="" 11141</a>: \n'
+ ' CSS \'@import\' doesn\'t respect HTML Base element.</p>\n'
+ ' <p class="c1">This text should be green.</p>\n'
+ ' <p>If it is red, the css has been loaded relative to the document.\n'
+ ' If it is black, no stylesheet has been rendered, if it is rendered green,\n'
+ ' the stylesheet has been rendered correctly from the HREF attribute of the\n'
+ ' Base element in the HEAD section of this document.</p>\n'
+ ' <p class="c2">This text should also be green.</p>\n'
+ ' </body>\n'
+ '</html>\n'.format(host)
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/uri/css-href.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Modified: trunk/LayoutTests/http/tests/uri/curly-braces-escaping-expected.txt (273744 => 273745)
--- trunk/LayoutTests/http/tests/uri/curly-braces-escaping-expected.txt 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/http/tests/uri/curly-braces-escaping-expected.txt 2021-03-02 19:19:44 UTC (rev 273745)
@@ -3,7 +3,7 @@
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS req.responseText is '/uri/resources/echo-uri.php?q={}'
+PASS req.responseText is '/uri/resources/echo-uri.py?q={}'
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/http/tests/uri/curly-braces-escaping.html (273744 => 273745)
--- trunk/LayoutTests/http/tests/uri/curly-braces-escaping.html 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/http/tests/uri/curly-braces-escaping.html 2021-03-02 19:19:44 UTC (rev 273745)
@@ -12,9 +12,9 @@
jsTestIsAsync = true;
var req = new XMLHttpRequest;
-req.open("GET", "resources/echo-uri.php?q={}", true);
+req.open("GET", "resources/echo-uri.py?q={}", true);
req._onload_ = function() {
- shouldBe("req.responseText", "'/uri/resources/echo-uri.php?q={}'");
+ shouldBe("req.responseText", "'/uri/resources/echo-uri.py?q={}'");
finishJSTest();
}
req.send();
Modified: trunk/LayoutTests/http/tests/uri/intercept/.htaccess (273744 => 273745)
--- trunk/LayoutTests/http/tests/uri/intercept/.htaccess 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/http/tests/uri/intercept/.htaccess 2021-03-02 19:19:44 UTC (rev 273745)
@@ -1,2 +1,2 @@
RewriteEngine on
-RewriteRule ^.* /uri/resources/print-uri.php [L,NS]
+RewriteRule ^.* /uri/resources/print-uri.py [L,NS]
Deleted: trunk/LayoutTests/http/tests/uri/resources/echo-uri.php (273744 => 273745)
--- trunk/LayoutTests/http/tests/uri/resources/echo-uri.php 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/http/tests/uri/resources/echo-uri.php 2021-03-02 19:19:44 UTC (rev 273745)
@@ -1,7 +0,0 @@
-<?php
- header("Content-Type: text/plain");
- header("Expires: Thu, 01 Dec 2003 16:00:00 GMT\n");
- header("Cache-Control: no-store, no-cache, must-revalidate\n");
- header("Pragma: no-cache\n");
- echo $_SERVER['REQUEST_URI'];
-?>
Added: trunk/LayoutTests/http/tests/uri/resources/echo-uri.py (0 => 273745)
--- trunk/LayoutTests/http/tests/uri/resources/echo-uri.py (rev 0)
+++ trunk/LayoutTests/http/tests/uri/resources/echo-uri.py 2021-03-02 19:19:44 UTC (rev 273745)
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+uri = os.environ.get('REQUEST_URI', '')
+
+sys.stdout.write(
+ 'Content-Type: text/plain\r\n'
+ 'Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n'
+ 'Cache-Control: no-store, no-cache, must-revalidate\r\n'
+ 'Pragma: no-cache\r\n\r\n'
+ '{}'.format(uri)
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/uri/resources/echo-uri.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Deleted: trunk/LayoutTests/http/tests/uri/resources/print-uri.php (273744 => 273745)
--- trunk/LayoutTests/http/tests/uri/resources/print-uri.php 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/http/tests/uri/resources/print-uri.php 2021-03-02 19:19:44 UTC (rev 273745)
@@ -1,7 +0,0 @@
-<?php
- header("Content-Type: text/_javascript_");
- header("Expires: Thu, 01 Dec 2003 16:00:00 GMT\n");
- header("Cache-Control: no-store, no-cache, must-revalidate\n");
- header("Pragma: no-cache\n");
- echo "document.write('" . $_SERVER['REQUEST_URI'] . "');";
-?>
Added: trunk/LayoutTests/http/tests/uri/resources/print-uri.py (0 => 273745)
--- trunk/LayoutTests/http/tests/uri/resources/print-uri.py (rev 0)
+++ trunk/LayoutTests/http/tests/uri/resources/print-uri.py 2021-03-02 19:19:44 UTC (rev 273745)
@@ -0,0 +1,14 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+
+uri = os.environ.get('REQUEST_URI', '')
+
+sys.stdout.write(
+ 'Content-Type: text/_javascript_\r\n'
+ 'Expires: Thu, 01 Dec 2003 16:00:00 GMT\r\n'
+ 'Cache-Control: no-store, no-cache, must-revalidate\r\n'
+ 'Pragma: no-cache\r\n\r\n'
+ 'document.write(\'{}\');'.format(uri)
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/uri/resources/print-uri.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Modified: trunk/LayoutTests/platform/ios/TestExpectations (273744 => 273745)
--- trunk/LayoutTests/platform/ios/TestExpectations 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2021-03-02 19:19:44 UTC (rev 273745)
@@ -1917,7 +1917,7 @@
http/tests/misc/favicon-as-image.html [ Failure ]
http/tests/misc/iframe404.html [ Failure ]
http/tests/misc/slow-loading-image-in-pattern.html [ Failure ]
-http/tests/uri/css-href.php [ Failure ]
+http/tests/uri/css-href.py [ Failure ]
svg/hixie/intrinsic/003.html [ Failure ]
svg/hixie/text/003.html [ Failure ]
Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (273744 => 273745)
--- trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-03-02 19:19:13 UTC (rev 273744)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-03-02 19:19:44 UTC (rev 273745)
@@ -366,7 +366,7 @@
http/tests/security/no-referrer.html [ Failure ]
http/tests/security/redirect-BLOCKED-to-localURL.html [ Failure ]
http/tests/security/setDomainRelaxationForbiddenForURLScheme.html [ Failure ]
-http/tests/uri/css-href.php [ Failure ]
+http/tests/uri/css-href.py [ Failure ]
# HTTP tests that assert:
http/tests/plugins/plugin-document-has-focus.html