tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 7d45f6c13c75bf734bcbeb520f543d4e4d720c8f
parent cd803dbbeb417d9e91516c2697ed66e9b36a0570
Author: Mohamed Amir Yosef <mamir@chromium.org>
Date:   Thu, 27 Nov 2025 15:28:44 +0000

Bug 2002714 [wpt PR 55359] - Removes the mandatory mediation requirement for digital credentials API, a=testonly

Automatic update from web-platform-tests
Removes the mandatory mediation requirement for digital credentials API (#55359)

* Removes the mandatory mediation requirement for creating and getting digital credentials.

* Add test that request is aborted regardless of the mediation
--

wpt-commits: a16d4deef024ed99688b067db85fa19855b1d7c0
wpt-pr: 55359

Diffstat:
Mtesting/web-platform/tests/digital-credentials/allow-attribute-with-create.https.html | 1-
Mtesting/web-platform/tests/digital-credentials/allow-attribute-with-get.https.html | 1-
Mtesting/web-platform/tests/digital-credentials/create.tentative.https.html | 14+++-----------
Mtesting/web-platform/tests/digital-credentials/get.tentative.https.html | 20+++++++++++---------
4 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/testing/web-platform/tests/digital-credentials/allow-attribute-with-create.https.html b/testing/web-platform/tests/digital-credentials/allow-attribute-with-create.https.html @@ -107,7 +107,6 @@ // Results in TypeError when allowed, NotAllowedError when disallowed requests: [], }, - mediation: "required", }; const { data } = await new Promise((resolve) => { window.addEventListener("message", resolve, { diff --git a/testing/web-platform/tests/digital-credentials/allow-attribute-with-get.https.html b/testing/web-platform/tests/digital-credentials/allow-attribute-with-get.https.html @@ -108,7 +108,6 @@ // NotAllowedError when disallowed requests: [], }, - mediation: "required", }; await test_driver.bless("User activation"); const { data } = await new Promise((resolve) => { diff --git a/testing/web-platform/tests/digital-credentials/create.tentative.https.html b/testing/web-platform/tests/digital-credentials/create.tentative.https.html @@ -17,7 +17,6 @@ const iframeSameOrigin = document.querySelector("iframe#same-origin"); const iframeCrossOrigin = document.querySelector("iframe#cross-origin"); - const mediations = ["silent", "optional", "conditional", "required"]; promise_setup(async () => { const hostInfo = get_host_info(); @@ -209,6 +208,8 @@ }, "navigator.credentials.create() promise is rejected if abort controller is aborted after call to create() in cross-origin iframe."); promise_test(async (t) => { + /** @type sequence<CredentialMediationRequirement> */ + const mediations = ["silent", "optional", "conditional", "required"]; const abortController = new AbortController(); const { signal } = abortController; abortController.abort(); @@ -219,16 +220,7 @@ }); await promise_rejects_dom(t, "AbortError", requestPromise); } - }, "Adding mediations together with abort signal respects the abort signal."); - - promise_test(async (t) => { - /** @type sequence<CredentialMediationRequirement> */ - const disallowedMediations = [ "conditional", "optional", "silent"]; - for (const mediation of disallowedMediations) { - const options = makeCreateOptions("default", mediation); - await promise_rejects_js(t, TypeError, navigator.credentials.create(options)); - } - }, "Mediation is required to create a DigitalCredential."); + }, "Mediation is implicitly required and hence ignored. Request is aborted regardless."); promise_test(async (t) => { await promise_rejects_js( diff --git a/testing/web-platform/tests/digital-credentials/get.tentative.https.html b/testing/web-platform/tests/digital-credentials/get.tentative.https.html @@ -233,16 +233,18 @@ promise_test(async (t) => { /** @type sequence<CredentialMediationRequirement> */ - const disallowedMediations = ["conditional", "optional", "silent"]; - for (const mediation of disallowedMediations) { - const options = makeGetOptions("default", mediation); - await promise_rejects_js( - t, - TypeError, - navigator.credentials.get(options) - ); + const mediations = ["silent", "optional", "conditional", "required"]; + const abortController = new AbortController(); + const { signal } = abortController; + abortController.abort(); + for (const mediation of mediations) { + const requestPromise = navigator.credentials.get({ + mediation, + signal, + }); + await promise_rejects_dom(t, "AbortError", requestPromise); } - }, "Mediation is required to get a DigitalCredential."); + }, "Mediation is implicitly required and hence ignored. Request is aborted regardless."); promise_test(async t => { const throwingValues = [