Diff
Modified: trunk/LayoutTests/ChangeLog (290976 => 290977)
--- trunk/LayoutTests/ChangeLog 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/ChangeLog 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,3 +1,12 @@
+2022-03-08 Chris Dumez <cdu...@apple.com>
+
+ Resync web-platform-tests/beacon from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=237536
+
+ Unreviewed, drop web-platform-tests/beacon tests that are no longer upstream.
+
+ * TestExpectations:
+
2022-03-07 Andres Gonzalez <andresg...@apple.com>
Fix for <select> elements in isolated tree mode.
Modified: trunk/LayoutTests/TestExpectations (290976 => 290977)
--- trunk/LayoutTests/TestExpectations 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/TestExpectations 2022-03-08 08:01:30 UTC (rev 290977)
@@ -849,7 +849,6 @@
imported/w3c/web-platform-tests/user-timing/mark.html [ Failure Pass ]
imported/w3c/web-platform-tests/user-timing/measure_associated_with_navigation_timing.html [ Failure Pass ]
imported/w3c/web-platform-tests/html/webappapis/system-state-and-capabilities/the-navigator-object/plugins-and-mimetypes.html [ Failure Pass ]
-imported/w3c/web-platform-tests/beacon/beacon-redirect.sub.window.html [ Failure Pass ]
imported/w3c/web-platform-tests/html/cross-origin-embedder-policy/anonymous-iframe/sharedworker-partitioning.tentative.https.window.html [ Failure Pass ]
imported/w3c/web-platform-tests/service-workers/service-worker/navigation-timing-extended.https.html [ Failure Pass ]
imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing-fetch-variants.https.html [ Failure Pass ]
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,3 +1,23 @@
+2022-03-08 Chris Dumez <cdu...@apple.com>
+
+ Resync web-platform-tests/beacon from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=237536
+
+ Unreviewed, drop web-platform-tests/beacon tests that are no longer upstream (as of 30d5f8f4c7687a4f2c0).
+
+ * web-platform-tests/beacon/beacon-basic-blob-expected.txt: Removed.
+ * web-platform-tests/beacon/beacon-navigate-expected.txt: Removed.
+ * web-platform-tests/beacon/beacon-redirect.sub.window-expected.txt: Removed.
+ * web-platform-tests/beacon/beacon-redirect.sub.window.html: Removed.
+ * web-platform-tests/beacon/resources/beacon-preflight.py: Removed.
+ (respondToCORSPreflight): Deleted.
+ (main): Deleted.
+ * web-platform-tests/beacon/resources/redirect.py: Removed.
+ (main): Deleted.
+ * web-platform-tests/beacon/resources/upgrade-iframe.html: Removed.
+ * web-platform-tests/beacon/upgrade-beacon.https-expected.txt: Removed.
+ * web-platform-tests/beacon/upgrade-beacon.https.html: Removed.
+
2022-03-07 Chris Dumez <cdu...@apple.com>
Make "true" count as truthy in window.open()'s boolean features
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-basic-blob-expected.txt (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-basic-blob-expected.txt 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-basic-blob-expected.txt 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,6 +0,0 @@
-
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: EmptyBlob
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallBlob
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: MediumBlob
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: LargeBlob
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-navigate-expected.txt (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-navigate-expected.txt 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-navigate-expected.txt 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,13 +0,0 @@
-
-
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: NoData-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: NullData-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: UndefinedData-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallString-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallBlob-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallBufferSource-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallFormData-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeEncoded-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeForm-NAVIGATE
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeText-NAVIGATE
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-redirect.sub.window-expected.txt (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-redirect.sub.window-expected.txt 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-redirect.sub.window-expected.txt 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,22 +0,0 @@
-
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: NoData-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: NullData-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: UndefinedData-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallString-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallBlob-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallBufferSource-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallFormData-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeEncoded-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeForm-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeText-307
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: NoData-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: NullData-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: UndefinedData-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallString-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallBlob-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallBufferSource-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallFormData-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeEncoded-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeForm-308
-PASS Verify 'navigator.sendbeacon()' successfully sends for variant: SmallSafeContentTypeText-308
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-redirect.sub.window.html (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-redirect.sub.window.html 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/beacon-redirect.sub.window.html 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1 +0,0 @@
-<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/beacon-preflight.py (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/beacon-preflight.py 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/beacon-preflight.py 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,56 +0,0 @@
-import json
-from wptserve.utils import isomorphic_decode
-
-def respondToCORSPreflight(request, response):
- allow_cors = int(request.GET.first(b"allowCors", 0)) != 0;
-
- if not allow_cors:
- response.set_error(400, "Not allowed")
- return "ERROR: Not allowed"
-
- if not b"Access-Control-Request-Method" in request.headers:
- response.set_error(400, "No Access-Control-Request-Method header")
- return "ERROR: No access-control-request-method in preflight!"
-
- headers = [(b"Content-Type", b"text/plain")]
- headers.append((b"Access-Control-Allow-Origin", request.headers.get(b"Origin", b"*")))
- headers.append((b"Access-Control-Allow-Credentials", b"true"))
- requested_method = request.headers.get(b"Access-Control-Request-Method", None)
- headers.append((b"Access-Control-Allow-Methods", requested_method))
- requested_headers = request.headers.get(b"Access-Control-Request-Headers", None)
- headers.append((b"Access-Control-Allow-Headers", requested_headers))
- headers.append((b"Access-Control-Max-Age", b"60"))
- return headers, ""
-
-def main(request, response):
- command = request.GET.first(b"cmd").lower();
- test_id = request.GET.first(b"id")
- stashed_data = request.server.stash.take(test_id)
- if stashed_data is None:
- stashed_data = { 'preflight': 0, 'beacon': 0, 'preflight_requested_method': '', 'preflight_requested_headers': '', 'preflight_referrer': '', 'preflight_cookie_header': '', 'beacon_cookie_header': '' }
-
- if command == b"put":
- if request.method == "OPTIONS":
- stashed_data['preflight'] = 1;
- stashed_data['preflight_requested_method'] = isomorphic_decode(request.headers.get(b"Access-Control-Request-Method", b""))
- stashed_data['preflight_requested_headers'] = isomorphic_decode(request.headers.get(b"Access-Control-Request-Headers", b""))
- stashed_data['preflight_cookie_header'] = isomorphic_decode(request.headers.get(b"Cookie", b""));
- stashed_data['preflight_referer'] = isomorphic_decode(request.headers.get(b"Referer", b""))
- stashed_data['preflight_origin'] = isomorphic_decode(request.headers.get(b"Origin", b""))
- request.server.stash.put(test_id, stashed_data)
- return respondToCORSPreflight(request, response)
- elif request.method == "POST":
- stashed_data['beacon'] = 1;
- stashed_data['beacon_cookie_header'] = isomorphic_decode(request.headers.get(b"Cookie", b""))
- stashed_data['beacon_origin'] = isomorphic_decode(request.headers.get(b"Origin", b""))
- stashed_data['url'] = request.url
- request.server.stash.put(test_id, stashed_data)
- return [(b"Content-Type", b"text/plain")], ""
-
- if command == b"get":
- if stashed_data is not None:
- return [(b"Content-Type", b"text/plain")], json.dumps(stashed_data)
- return [(b"Content-Type", b"text/plain")], ""
-
- response.set_error(400, "Bad Command")
- return "ERROR: Bad Command!"
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/redirect.py (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/redirect.py 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/redirect.py 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,63 +0,0 @@
-from urllib.parse import urlencode, urlparse
-from wptserve.utils import isomorphic_decode, isomorphic_encode
-
-def main(request, response):
- stashed_data = {'count': 0, 'preflight': "0"}
- status = 302
- headers = [(b"Content-Type", b"text/plain"),
- (b"Cache-Control", b"no-cache"),
- (b"Pragma", b"no-cache"),
- (b"Access-Control-Allow-Credentials", b"true")]
- headers.append((b"Access-Control-Allow-Origin", request.headers.get(b"Origin", b"*")))
- token = None
-
- if b"token" in request.GET:
- token = request.GET.first(b"token")
- data = ""
- if data:
- stashed_data = data
-
- if request.method == "OPTIONS":
- requested_method = request.headers.get(b"Access-Control-Request-Method", None)
- headers.append((b"Access-Control-Allow-Methods", requested_method))
- requested_headers = request.headers.get(b"Access-Control-Request-Headers", None)
- headers.append((b"Access-Control-Allow-Headers", requested_headers))
- stashed_data['preflight'] = "1"
- #Preflight is not redirected: return 200
- if not b"redirect_preflight" in request.GET:
- if token:
- request.server.stash.put(request.GET.first("token"), stashed_data)
- return 200, headers, ""
-
- if b"redirect_status" in request.GET:
- status = int(request.GET[b'redirect_status'])
-
- stashed_data['count'] += 1
-
- if b"location" in request.GET:
- url = ""
- scheme = urlparse(url).scheme
- if scheme == "" or scheme == "http" or scheme == "https":
- url += "&" if '?' in url else "?"
- #keep url parameters in location
- url_parameters = {}
- for item in request.GET.items():
- url_parameters[item[0]] = item[1][0]
- url += urlencode(url_parameters)
- #make sure location changes during redirection loop
- url += "&count=" + str(stashed_data['count'])
- headers.append((b"Location", isomorphic_encode(url)))
-
- if b"redirect_referrerpolicy" in request.GET:
- headers.append((b"Referrer-Policy", request.GET[b'redirect_referrerpolicy']))
-
- if token:
- request.server.stash.put(request.GET.first(b"token"), stashed_data)
- if b"max_count" in request.GET:
- max_count = int(request.GET[b'max_count'])
- #stop redirecting and return count
- if stashed_data['count'] > max_count:
- # -1 because the last is not a redirection
- return str(stashed_data['count'] - 1)
-
- return status, headers, ""
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/upgrade-iframe.html (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/upgrade-iframe.html 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/resources/upgrade-iframe.html 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,41 +0,0 @@
-<html>
-<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
-<body>
-<script src=""
-<script src=""
-<script>
-var id = self.token();
-var hostInfo = get_host_info();
-var beaconURL = "http://" + hostInfo.ORIGINAL_HOST + ":" + hostInfo.HTTPS_PORT + "/beacon/resources/beacon-preflight.py?allowCors=1&cmd=put&id=" + id;
-
-function sendBeacon()
-{
- return navigator.sendBeacon(beaconURL, "test");
-}
-
-function sendRedirectedBeacon()
-{
- return navigator.sendBeacon("redirect.py?redirect_status=307&location=" + beaconURL, "test");
-}
-
-function waitFor(test, duration)
-{
- return new Promise((resolve) => test.step_timeout(resolve, duration));
-}
-
-async function checkBeaconURL(test)
-{
- var checkURL = "beacon-preflight.py?cmd=get&id=" + id;
- var counter = 0;
- while (++counter < 20) {
- let response = await fetch(checkURL);
- let body = await response.json();
- if (body.url)
- return body.url.startsWith('https://');
- await waitFor(test, 50);
- }
-}
-</script>
-
-</body>
-</html>
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/upgrade-beacon.https-expected.txt (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/upgrade-beacon.https-expected.txt 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/upgrade-beacon.https-expected.txt 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,5 +0,0 @@
-
-
-PASS Ensure beacon gets upgraded
-PASS Ensure beacon gets upgraded after redirection
-
Deleted: trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/upgrade-beacon.https.html (290976 => 290977)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/upgrade-beacon.https.html 2022-03-08 07:28:30 UTC (rev 290976)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/beacon/upgrade-beacon.https.html 2022-03-08 08:01:30 UTC (rev 290977)
@@ -1,28 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
-<script src=""
-<script src=""
-<script>
-function with_iframe(url) {
- return new Promise(function(resolve) {
- var frame = document.createElement('iframe');
- frame.src = ""
- frame._onload_ = function() { resolve(frame); };
- document.body.appendChild(frame);
- });
-}
-var frame;
-promise_test(async (test) => {
- frame = await with_iframe('resources/upgrade-iframe.html');
- assert_true(frame.contentWindow.sendBeacon(), "Send beacon successfully");
- assert_true(await frame.contentWindow.checkBeaconURL(test), "Upgraded beacon URL");
-}, "Ensure beacon gets upgraded");
-
-promise_test(async (test) => {
- assert_true(frame.contentWindow.sendRedirectedBeacon(), "Send beacon successfully");
- assert_true(await frame.contentWindow.checkBeaconURL(test), "Upgraded beacon URL");
-}, "Ensure beacon gets upgraded after redirection");
-</script>
-</body>
-</html>