Skip to content

Commit 41fd8ad

Browse files
committed
Merge branch 'SpeculationRulesPrefetchWebDriverBidi' of https://github.com/srwei/wpt into SpeculationRulesPrefetchWebDriverBidi
2 parents 386f50d + 27aaa43 commit 41fd8ad

File tree

1,723 files changed

+37115
-6798
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,723 files changed

+37115
-6798
lines changed

.github/workflows/update-wasm-tests.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@ jobs:
3030
- name: Convert WAST tests to WPT
3131
run: wasm-spec/test/build.py --dont-recompile --html wasm-spec/out/
3232
- name: Copy Wasm tests to WPT
33-
# Replace wasm/core entirely.
33+
# Replace wasm/core entirely, but preserve WEB_FEATURES.yml files.
3434
run: |
35-
rm -rf wpt/wasm/core
36-
cp -r wasm-spec/out/ wpt/wasm/core/
35+
rsync -a --delete --exclude 'WEB_FEATURES.yml' wasm-spec/out/ wpt/wasm/core/
3736
- name: Commit changes
3837
id: commit
3938
continue-on-error: true
@@ -57,7 +56,7 @@ jobs:
5756
run: |
5857
cd wpt
5958
git push --set-upstream origin $BRANCH_NAME
60-
gh pr create --title "$COMMIT_TITLE" --body "$PR_BODY" --reviewer past
59+
gh pr create --title "$COMMIT_TITLE" --body "$PR_BODY" --reviewer jcscottiii,dschuff
6160
env:
6261
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6362
COMMIT_TITLE: "Update Wasm tests"

.well-known/web-identity

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ import importlib
22
keys = importlib.import_module("fedcm.support.keys")
33

44
def main(request, response):
5-
manifest_url = request.server.stash.take(keys.MANIFEST_URL_IN_MANIFEST_LIST_KEY)
5+
namespace = "/.well-known/web-identity"
6+
7+
well_known_format = request.server.stash.take(keys.WELL_KNOWN_FORMAT_KEY, namespace)
8+
9+
port = request.server.config.ports["https"][0]
10+
hostname = request.url_parts.hostname
11+
base_url = "https://{0}:{1}".format(hostname, str(port))
12+
13+
manifest_url = request.server.stash.take(keys.MANIFEST_URL_IN_MANIFEST_LIST_KEY, namespace)
614

715
if manifest_url is None or not len(manifest_url):
8-
port = request.server.config.ports["https"][0]
9-
hostname = request.url_parts.hostname
10-
manifest_url = "https://{0}:{1}/fedcm/support/manifest.py".format(
11-
hostname, str(port))
16+
manifest_url = "{0}/fedcm/support/manifest.py".format(base_url)
1217
else:
1318
try:
1419
manifest_url = manifest_url.decode()
@@ -32,10 +37,54 @@ def main(request, response):
3237

3338
response.headers.set(b"Content-Type", b"application/json")
3439

40+
# Handle different well-known formats
41+
if well_known_format:
42+
try:
43+
format_type = well_known_format.decode()
44+
except (UnicodeDecodeError, AttributeError):
45+
format_type = str(well_known_format)
46+
47+
if format_type == "direct":
48+
# Direct endpoints format with abs URLs
49+
return """
50+
{{
51+
"accounts_endpoint": "{0}/fedcm/support/accounts.py",
52+
"login_url": "{0}/fedcm/support/login.html"
53+
}}
54+
""".format(base_url)
55+
elif format_type == "empty":
56+
# Empty endpoints (keep as empty strings)
57+
return """
58+
{
59+
"accounts_endpoint": "",
60+
"login_url": ""
61+
}
62+
"""
63+
elif format_type == "missing":
64+
# Missing required endpoints
65+
return """
66+
{
67+
}
68+
"""
69+
elif format_type == "partial_accounts":
70+
# Only accounts_endpoint with abs URL
71+
return """
72+
{{
73+
"accounts_endpoint": "{0}/fedcm/support/accounts.py"
74+
}}
75+
""".format(base_url)
76+
elif format_type == "partial_login":
77+
# Only login_url with abs URL
78+
return """
79+
{{
80+
"login_url": "{0}/fedcm/support/login.html"
81+
}}
82+
""".format(base_url)
83+
# Default: provider_urls
3584
return """
3685
{{
3786
"provider_urls": [
3887
"{0}"
3988
]
4089
}}
41-
""".format(manifest_url)
90+
""".format(manifest_url)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<!DOCTYPE html>
2+
<!-- Test that a capitalized second ARIA role fallback doesn't cause a crash -->
3+
4+
<html>
5+
6+
<div role="Login Form"></div>
7+
8+
</html>

battery-status/battery-allowed-by-permissions-policy-attribute-redirect-on-load.https.sub.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<script src=/resources/testharness.js></script>
44
<script src=/resources/testharnessreport.js></script>
55
<script src=/permissions-policy/resources/permissions-policy.js></script>
6+
<script src="resources/battery-status-helpers.js"></script>
67
<script>
78
'use strict';
89

@@ -20,6 +21,7 @@
2021
}, `${header} allows same-origin relocation.`);
2122

2223
async_test(t => {
24+
assert_implements_battery();
2325
test_feature_availability(
2426
'navigator.getBattery()', t, cross_origin_src,
2527
expect_feature_unavailable_default, 'battery');

0 commit comments

Comments
 (0)