Diff
Modified: trunk/LayoutTests/ChangeLog (275397 => 275398)
--- trunk/LayoutTests/ChangeLog 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/ChangeLog 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1,3 +1,28 @@
+2021-04-01 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>
+
+ Reviewed by Jonathan Bedard.
+
+ * http/tests/history/back-to-post.php: Removed.
+ * http/tests/history/back-to-post.py: Added.
+ * http/tests/history/back-with-fragment-change-expected.txt:
+ * http/tests/history/back-with-fragment-change.php: Removed.
+ * http/tests/history/back-with-fragment-change.py: Added.
+ * http/tests/history/resources/back-during-onload-hung-page.php: Removed.
+ * http/tests/history/resources/back-during-onload-hung-page.py: Added.
+ * http/tests/history/resources/back-during-onload-middle.html:
+ * http/tests/navigation/resources/back-twice-page-2.html:
+ * platform/glib/TestExpectations:
+ * platform/ios-wk1/TestExpectations:
+ * platform/ios-wk2/TestExpectations:
+ * platform/ios/TestExpectations:
+ * platform/mac-wk1/TestExpectations:
+ * platform/mac-wk2/TestExpectations:
+ * platform/win/TestExpectations:
+
2021-04-01 Robert Jenner <[email protected]>
inspector/animation/lifecycle-css-transition.html is a flakey timeout on EWS
Deleted: trunk/LayoutTests/http/tests/history/back-to-post.php (275397 => 275398)
--- trunk/LayoutTests/http/tests/history/back-to-post.php 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/http/tests/history/back-to-post.php 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1,53 +0,0 @@
-<?php
-header("Cache-control: no-cache, no-store");
-header("Pragma: no-cache");
-?>
-
-<html>
-<body>
-<p>Test for <a href=""
-Getting an error page instead of login page navigating back in gmail.</p>
-<div id="result">FAIL: Script did not run</div>
-
-<form action="" method="post">
-<input name="a" value="b">
-<input id="mysubmit" type="submit" name="Submit" value="Submit">
-</form>
-<script>
-
-function submitForm()
-{
- // Submit form in a timeout to make sure that we create a new back/forward list item.
- setTimeout(function() {document.forms[0].submit()}, 0);
-}
-
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-// Disable b/f cache (not necessary in DRT since the b/f cache is disabled by default).
-if (!window.testRunner)
- window._onunload_ = function() {}
-
-if (document.location.search == "") {
- window.name = ""; // Use window.name to communicate between steps.
- submitForm();
-} else if (document.location.search == "?1") {
- if (window.name == "finish") {
- window.name = "";
- document.getElementById("result").innerHTML = 'PASS';
- if (window.testRunner)
- testRunner.notifyDone();
- } else {
- document.forms[0].action = ""
- submitForm();
- }
-} else {
- // Test that going back to form submission result works.
- window.name = "finish";
- history.back();
-}
-</script>
-</body>
-</html>
Copied: trunk/LayoutTests/http/tests/history/back-to-post.py (from rev 275397, trunk/LayoutTests/http/tests/history/back-to-post.php) (0 => 275398)
--- trunk/LayoutTests/http/tests/history/back-to-post.py (rev 0)
+++ trunk/LayoutTests/http/tests/history/back-to-post.py 2021-04-02 01:03:38 UTC (rev 275398)
@@ -0,0 +1,58 @@
+#!/usr/bin/env python3
+
+import sys
+
+sys.stdout.write(
+ 'Cache-control: no-cache, no-store\r\n'
+ 'Pragma: no-cache\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
+
+print('''<html>
+<body>
+<p>Test for <a href=""
+Getting an error page instead of login page navigating back in gmail.</p>
+<div id="result">FAIL: Script did not run</div>
+
+<form action="" method="post">
+<input name="a" value="b">
+<input id="mysubmit" type="submit" name="Submit" value="Submit">
+</form>
+<script>
+
+function submitForm()
+{
+ // Submit form in a timeout to make sure that we create a new back/forward list item.
+ setTimeout(function() {document.forms[0].submit()}, 0);
+}
+
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+// Disable b/f cache (not necessary in DRT since the b/f cache is disabled by default).
+if (!window.testRunner)
+ window._onunload_ = function() {}
+
+if (document.location.search == "") {
+ window.name = ""; // Use window.name to communicate between steps.
+ submitForm();
+} else if (document.location.search == "?1") {
+ if (window.name == "finish") {
+ window.name = "";
+ document.getElementById("result").innerHTML = 'PASS';
+ if (window.testRunner)
+ testRunner.notifyDone();
+ } else {
+ document.forms[0].action = ""
+ submitForm();
+ }
+} else {
+ // Test that going back to form submission result works.
+ window.name = "finish";
+ history.back();
+}
+</script>
+</body>
+</html>''')
\ No newline at end of file
Property changes: trunk/LayoutTests/http/tests/history/back-to-post.py
Added: svn:executable
+*
\ No newline at end of property
Modified: trunk/LayoutTests/http/tests/history/back-with-fragment-change-expected.txt (275397 => 275398)
--- trunk/LayoutTests/http/tests/history/back-with-fragment-change-expected.txt 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/http/tests/history/back-with-fragment-change-expected.txt 2021-04-02 01:03:38 UTC (rev 275398)
@@ -3,7 +3,7 @@
PASS
============== Back Forward List ==============
- http://127.0.0.1:8000/history/back-with-fragment-change.php **nav target**
+ http://127.0.0.1:8000/history/back-with-fragment-change.py **nav target**
http://127.0.0.1:8000/history/resources/back-with-fragment-change-target.html **nav target**
curr-> http://127.0.0.1:8000/history/resources/back-with-fragment-change-target.html#foo **nav target**
===============================================
Deleted: trunk/LayoutTests/http/tests/history/back-with-fragment-change.php (275397 => 275398)
--- trunk/LayoutTests/http/tests/history/back-with-fragment-change.php 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/http/tests/history/back-with-fragment-change.php 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1,42 +0,0 @@
-<?php
-// We intentionally want the page to load slowly (every time, hence no caching),
-// so that when back-with-fragment-change-target.html calls history.back(), the
-// load is provisional for a while (long enough for the window.location = '#foo'
-// script to run and stop that load).
-sleep(2);
-
-header("Cache-control: no-cache, no-store");
-header("Pragma: no-cache");
-?>
-
-<script>
-if (window.testRunner) {
- testRunner.dumpBackForwardList();
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-
-_onload_ = function() {
- if (sessionStorage.didNavigate) {
- console.log('Should not have ended up back at the test start page');
- delete sessionStorage.didNavigate;
- if (window.testRunner)
- testRunner.notifyDone();
- return;
- }
-
- // Change the location in a timeout to make sure it generates a history entry
- setTimeout(function() {
- window.location = 'resources/back-with-fragment-change-target.html'
- sessionStorage.didNavigate = true;
- }, 0);
-}
-
-// Make sure there's no page cache.
-_onunload_ = function() { };
-</script>
-<p>
-Tests that a history navigation that is aborted by a fragment change doesn't
-update the provisional history item. This test relies on
-<code>testRunner.dumpBackForwardList</code> to verify correctness
-and thus can only be run via DumpRenderTree.</p>
Copied: trunk/LayoutTests/http/tests/history/back-with-fragment-change.py (from rev 275397, trunk/LayoutTests/http/tests/history/back-with-fragment-change.php) (0 => 275398)
--- trunk/LayoutTests/http/tests/history/back-with-fragment-change.py (rev 0)
+++ trunk/LayoutTests/http/tests/history/back-with-fragment-change.py 2021-04-02 01:03:38 UTC (rev 275398)
@@ -0,0 +1,49 @@
+#!/usr/bin/env python3
+
+import sys
+import time
+
+# We intentionally want the page to load slowly (every time, hence no caching),
+# so that when back-with-fragment-change-target.html calls history.back(), the
+# load is provisional for a while (long enough for the window.location = '#foo'
+# script to run and stop that load).
+
+time.sleep(2)
+
+sys.stdout.write(
+ 'Cache-control: no-cache, no-store\r\n'
+ 'Pragma: no-cache\r\n'
+ 'Content-Type: text/html\r\n\r\n'
+)
+
+print('''<script>
+if (window.testRunner) {
+ testRunner.dumpBackForwardList();
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+_onload_ = function() {
+ if (sessionStorage.didNavigate) {
+ console.log('Should not have ended up back at the test start page');
+ delete sessionStorage.didNavigate;
+ if (window.testRunner)
+ testRunner.notifyDone();
+ return;
+ }
+
+ // Change the location in a timeout to make sure it generates a history entry
+ setTimeout(function() {
+ window.location = 'resources/back-with-fragment-change-target.html'
+ sessionStorage.didNavigate = true;
+ }, 0);
+}
+
+// Make sure there's no page cache.
+_onunload_ = function() { };
+</script>
+<p>
+Tests that a history navigation that is aborted by a fragment change doesn't
+update the provisional history item. This test relies on
+<code>testRunner.dumpBackForwardList</code> to verify correctness
+and thus can only be run via DumpRenderTree.</p>''')
\ No newline at end of file
Property changes: trunk/LayoutTests/http/tests/history/back-with-fragment-change.py
Added: svn:executable
+*
\ No newline at end of property
Deleted: trunk/LayoutTests/http/tests/history/resources/back-during-onload-hung-page.php (275397 => 275398)
--- trunk/LayoutTests/http/tests/history/resources/back-during-onload-hung-page.php 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/http/tests/history/resources/back-during-onload-hung-page.php 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1,2 +0,0 @@
-<? sleep(60); ?>
-FAIL: Should never see this
Added: trunk/LayoutTests/http/tests/history/resources/back-during-onload-hung-page.py (0 => 275398)
--- trunk/LayoutTests/http/tests/history/resources/back-during-onload-hung-page.py (rev 0)
+++ trunk/LayoutTests/http/tests/history/resources/back-during-onload-hung-page.py 2021-04-02 01:03:38 UTC (rev 275398)
@@ -0,0 +1,11 @@
+#!/usr/bin/env python3
+
+import sys
+import time
+
+time.sleep(60)
+
+sys.stdout.write(
+ 'Content-Type: text/html\r\n\r\n'
+ 'FAIL: Should never see this'
+)
\ No newline at end of file
Property changes on: trunk/LayoutTests/http/tests/history/resources/back-during-onload-hung-page.py
___________________________________________________________________
Added: svn:executable
+*
\ No newline at end of property
Modified: trunk/LayoutTests/http/tests/history/resources/back-during-onload-middle.html (275397 => 275398)
--- trunk/LayoutTests/http/tests/history/resources/back-during-onload-middle.html 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/http/tests/history/resources/back-during-onload-middle.html 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1,2 +1,2 @@
middle<br>
-<iframe src=""
+<iframe src=""
Modified: trunk/LayoutTests/http/tests/navigation/resources/back-twice-page-2.html (275397 => 275398)
--- trunk/LayoutTests/http/tests/navigation/resources/back-twice-page-2.html 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/http/tests/navigation/resources/back-twice-page-2.html 2021-04-02 01:03:38 UTC (rev 275398)
@@ -11,7 +11,7 @@
// The second time we visit the page (i.e., while going back), insert an
// iframe that doesn't commit during the test.
var f = document.createElement("iframe");
- f.src = ""
+ f.src = ""
document.body.appendChild(f);
// Now go back. This will compete with the second queueBackNavigation
Modified: trunk/LayoutTests/platform/glib/TestExpectations (275397 => 275398)
--- trunk/LayoutTests/platform/glib/TestExpectations 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/platform/glib/TestExpectations 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1112,7 +1112,7 @@
# WebSocket-related bugs
#////////////////////////////////////////////////////////////////////////////////////////
-webkit.org/b/68278 http/tests/history/back-with-fragment-change.php [ Pass Failure ]
+webkit.org/b/68278 http/tests/history/back-with-fragment-change.py [ Pass Failure ]
webkit.org/b/208287 http/tests/eventsource/eventsource-page-cache-connected.html [ Timeout Pass ]
Modified: trunk/LayoutTests/platform/ios/TestExpectations (275397 => 275398)
--- trunk/LayoutTests/platform/ios/TestExpectations 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/platform/ios/TestExpectations 2021-04-02 01:03:38 UTC (rev 275398)
@@ -2268,7 +2268,7 @@
webkit.org/b/152306 fast/forms/input-user-input-sanitization.html [ Skip ]
-webkit.org/b/153314 http/tests/history/back-to-post.php [ Pass Timeout ]
+webkit.org/b/153314 http/tests/history/back-to-post.py [ Pass Timeout ]
webkit.org/b/153929 imported/w3c/web-platform-tests/html/semantics/document-metadata/styling/LinkStyle.html [ Pass Failure ]
Modified: trunk/LayoutTests/platform/ios-wk1/TestExpectations (275397 => 275398)
--- trunk/LayoutTests/platform/ios-wk1/TestExpectations 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/platform/ios-wk1/TestExpectations 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1053,8 +1053,8 @@
http/tests/globalhistory/history-delegate-basic-title.html
http/tests/globalhistory/history-delegate-basic-visited-links.html
http/tests/history/back-during-onload-triggered-by-back.html
-http/tests/history/back-to-post.php
-http/tests/history/back-with-fragment-change.php
+http/tests/history/back-to-post.py
+http/tests/history/back-with-fragment-change.py
http/tests/history/cross-origin-replace-history-object-child.html
http/tests/local/blob/send-sliced-data-blob.html
http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (275397 => 275398)
--- trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-04-02 01:03:38 UTC (rev 275398)
@@ -343,7 +343,7 @@
http/tests/download/inherited-encoding-form-submission-result.html [ Failure ]
http/tests/globalhistory/history-delegate-basic-refresh-redirect.html [ Failure ]
http/tests/globalhistory/history-delegate-basic-visited-links.html [ Failure ]
-http/tests/history/back-with-fragment-change.php [ Failure ]
+http/tests/history/back-with-fragment-change.py [ Failure ]
http/tests/loading/bad-scheme-subframe.html [ Failure ]
http/tests/misc/favicon-as-image.html [ Failure ]
http/tests/misc/favicon-loads-with-images-disabled.html [ Failure ]
Modified: trunk/LayoutTests/platform/mac-wk1/TestExpectations (275397 => 275398)
--- trunk/LayoutTests/platform/mac-wk1/TestExpectations 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/platform/mac-wk1/TestExpectations 2021-04-02 01:03:38 UTC (rev 275398)
@@ -923,7 +923,7 @@
http/tests/websocket/web-socket-loads-captured-in-per-page-domains.html [ Skip ]
-webkit.org/b/208022 [ Debug ] http/tests/history/back-to-post.php [ Pass Failure ]
+webkit.org/b/208022 [ Debug ] http/tests/history/back-to-post.py [ Pass Failure ]
# prefetch not supported in WK1
http/wpt/prefetch [ Skip ]
@@ -1088,7 +1088,7 @@
webkit.org/b/212851 [ Mojave Release ] js/dom/unhandled-promise-rejection-console-no-report.html [ Pass Failure ]
-webkit.org/b/68278 http/tests/history/back-with-fragment-change.php [ Failure ]
+webkit.org/b/68278 http/tests/history/back-with-fragment-change.py [ Failure ]
# <rdar://problem/60376665> [ macOS ] svg/custom/glyph-selection-arabic-forms.svg is failing since around r252706
[ Mojave ] svg/custom/glyph-selection-arabic-forms.svg [ Failure ]
Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (275397 => 275398)
--- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-04-02 01:03:38 UTC (rev 275398)
@@ -1032,7 +1032,7 @@
webkit.org/b/215468 [ Mojave Release ] media/modern-media-controls/scrubber-support/scrubber-support-drag.html [ Pass Failure ]
-webkit.org/b/68278 http/tests/history/back-with-fragment-change.php [ Pass Failure ]
+webkit.org/b/68278 http/tests/history/back-with-fragment-change.py [ Pass Failure ]
# Some WPT encoding tests run too slowly under ASan (and too slowly in debug builds).
# Since there is no convenient way to skip them under ASan only, skip all encoding tests here.
Modified: trunk/LayoutTests/platform/win/TestExpectations (275397 => 275398)
--- trunk/LayoutTests/platform/win/TestExpectations 2021-04-02 00:52:16 UTC (rev 275397)
+++ trunk/LayoutTests/platform/win/TestExpectations 2021-04-02 01:03:38 UTC (rev 275398)
@@ -2249,8 +2249,8 @@
http/tests/navigation/history-back-across-form-submission-to-fragment.html [ Skip ] # Timeout
http/tests/navigation/https-no-store-subframe-in-page-cache.html [ Skip ] # Timeout
http/tests/navigation/back-send-referrer.html [ Skip ] # Timeout
-http/tests/history/back-with-fragment-change.php [ Skip ] # Timeout
-http/tests/history/back-to-post.php [ Skip ] # Timeout
+http/tests/history/back-with-fragment-change.py [ Skip ] # Timeout
+http/tests/history/back-to-post.py [ Skip ] # Timeout
http/tests/history/replacestate-post-to-get-2.html [ Skip ] # Timeout
http/tests/workers/text-encoding.html [ Skip ] # Timeout
http/tests/security/cross-frame-access-protocol-explicit-domain.html [ Skip ] # Timeout