Title: [272907] trunk/LayoutTests
- Revision
- 272907
- Author
- commit-qu...@webkit.org
- Date
- 2021-02-16 08:48:00 -0800 (Tue, 16 Feb 2021)
Log Message
[LayoutTests] Convert http/tests/in-app-browser-privacy convert PHP to Python
https://bugs.webkit.org/show_bug.cgi?id=221928
<rdar://problem/74366517>
Patch by Chris Gambrell <cgambr...@apple.com> on 2021-02-16
Reviewed by Jonathan Bedard.
* http/tests/in-app-browser-privacy/resources/redirect.php: Removed.
* http/tests/in-app-browser-privacy/resources/redirect.py: Added.
* http/tests/in-app-browser-privacy/sub-frame-redirect-to-non-app-bound-domain-blocked.html:
* http/tests/in-app-browser-privacy/top-frame-redirect-to-non-app-bound-domain-blocked.html:
Modified Paths
Added Paths
Removed Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (272906 => 272907)
--- trunk/LayoutTests/ChangeLog 2021-02-16 16:46:42 UTC (rev 272906)
+++ trunk/LayoutTests/ChangeLog 2021-02-16 16:48:00 UTC (rev 272907)
@@ -1,3 +1,16 @@
+2021-02-16 Chris Gambrell <cgambr...@apple.com>
+
+ [LayoutTests] Convert http/tests/in-app-browser-privacy convert PHP to Python
+ https://bugs.webkit.org/show_bug.cgi?id=221928
+ <rdar://problem/74366517>
+
+ Reviewed by Jonathan Bedard.
+
+ * http/tests/in-app-browser-privacy/resources/redirect.php: Removed.
+ * http/tests/in-app-browser-privacy/resources/redirect.py: Added.
+ * http/tests/in-app-browser-privacy/sub-frame-redirect-to-non-app-bound-domain-blocked.html:
+ * http/tests/in-app-browser-privacy/top-frame-redirect-to-non-app-bound-domain-blocked.html:
+
2021-02-16 Antti Koivisto <an...@apple.com>
[LFC][Integration] Pass child inline block scroll overflow to parent
Deleted: trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/redirect.php (272906 => 272907)
--- trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/redirect.php 2021-02-16 16:46:42 UTC (rev 272906)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/redirect.php 2021-02-16 16:48:00 UTC (rev 272907)
@@ -1,13 +0,0 @@
-<?php
-if ($_GET['step'] == 1) {
- header("HTTP/1.0 302 Found");
- header('Location: http://localhost:8000/in-app-browser-privacy/resources/redirect.php?step=2');
-} else if ($_GET['step'] == 2) {
- header("HTTP/1.0 302 Found");
- header('Location: http://localhost:8000/in-app-browser-privacy/resources/redirect.php?step=3');
-} else if ($_GET['step'] == 3) {
- header("HTTP/1.0 200 OK");
- echo "FAILED: Should not have loaded\n";
- echo "<script> if (window.testRunner) testRunner.notifyDone();</script>\n";
-}
-?>
Added: trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/redirect.py (0 => 272907)
--- trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/redirect.py (rev 0)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/redirect.py 2021-02-16 16:48:00 UTC (rev 272907)
@@ -0,0 +1,26 @@
+#!/usr/bin/env python3
+
+import os
+import sys
+from urllib.parse import parse_qs
+
+step = int(parse_qs(os.environ.get('QUERY_STRING', ''), keep_blank_values=True).get('step', [0])[0])
+
+sys.stdout.write('Content-Type: text/html\r\n')
+
+if step == 1:
+ sys.stdout.write(
+ 'status: 302\r\n'
+ 'Location: http://localhost:8000/in-app-browser-privacy/resources/redirect.py?step=2\r\n\r\n'
+ )
+elif step == 2:
+ sys.stdout.write(
+ 'status: 302\r\n'
+ 'Location: http://localhost:8000/in-app-browser-privacy/resources/redirect.py?step=3\r\n\r\n'
+ )
+elif step == 3:
+ sys.stdout.write(
+ 'status: 200\r\n\r\n'
+ 'FAILED: Should not have loaded\n'
+ '<script> if (window.testRunner) testRunner.notifyDone();</script>\n'
+ )
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/in-app-browser-privacy/resources/redirect.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Modified: trunk/LayoutTests/http/tests/in-app-browser-privacy/sub-frame-redirect-to-non-app-bound-domain-blocked.html (272906 => 272907)
--- trunk/LayoutTests/http/tests/in-app-browser-privacy/sub-frame-redirect-to-non-app-bound-domain-blocked.html 2021-02-16 16:46:42 UTC (rev 272906)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/sub-frame-redirect-to-non-app-bound-domain-blocked.html 2021-02-16 16:48:00 UTC (rev 272907)
@@ -12,7 +12,7 @@
function loadFrame() {
let iframeElement = document.createElement("iframe");
- iframeElement.src = ""
+ iframeElement.src = ""
document.body.appendChild(iframeElement);
iframeElement._onload_ = checkForAppBound();
}
Modified: trunk/LayoutTests/http/tests/in-app-browser-privacy/top-frame-redirect-to-non-app-bound-domain-blocked.html (272906 => 272907)
--- trunk/LayoutTests/http/tests/in-app-browser-privacy/top-frame-redirect-to-non-app-bound-domain-blocked.html 2021-02-16 16:46:42 UTC (rev 272906)
+++ trunk/LayoutTests/http/tests/in-app-browser-privacy/top-frame-redirect-to-non-app-bound-domain-blocked.html 2021-02-16 16:48:00 UTC (rev 272907)
@@ -14,7 +14,7 @@
// Load this test again with a random dummy value to avoid caching.
document.location.href = "" + Math.random() + "#notempty";
} else {
- document.location.href = ""
+ document.location.href = ""
setTimeout(() => {
testPassed("Redirect to non app-bound domain failed");
finishJSTest();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes