tor-browser

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

commit bd4c24803d2a41cf92734a290879d90a987a92b0
parent a3c010063f021802589569e4f7352af993c5ffc8
Author: Mohamed Amir Yosef <mamir@chromium.org>
Date:   Thu, 27 Nov 2025 15:28:36 +0000

Bug 1998147 [wpt PR 55850] - Refactor: Replace openid4vp with the latest canonical protocol strings in digital credentials WPTs, a=testonly

Automatic update from web-platform-tests
Refactor: Replace openid4vp with the latest canonical protocol strings in digital credentials WPTs (#55850)

Co-authored-by: Marcos Cáceres <marcos@marcosc.com>
--

wpt-commits: fe2342bca9c5edb3a128899bbc5f54e3d9ff5d06
wpt-pr: 55850

Diffstat:
Mtesting/web-platform/tests/digital-credentials/dc-types.ts | 2+-
Mtesting/web-platform/tests/digital-credentials/get.tentative.https.html | 8++++----
Mtesting/web-platform/tests/digital-credentials/non-fully-active.https.html | 2+-
Mtesting/web-platform/tests/digital-credentials/support/helper.js | 11+++++++----
Mtesting/web-platform/tests/digital-credentials/user-activation.https.html | 4++--
5 files changed, 15 insertions(+), 12 deletions(-)

diff --git a/testing/web-platform/tests/digital-credentials/dc-types.ts b/testing/web-platform/tests/digital-credentials/dc-types.ts @@ -1,4 +1,4 @@ -export type GetProtocol = "default" | "openid4vp"; +export type GetProtocol = "default" | "openid4vp-v1-unsigned" | "openid4vp-v1-signed" | "openid4vp-v1-multisigned"; export type CreateProtocol = "default" | "openid4vci"; export type CredentialMediationRequirement = diff --git a/testing/web-platform/tests/digital-credentials/get.tentative.https.html b/testing/web-platform/tests/digital-credentials/get.tentative.https.html @@ -36,7 +36,7 @@ requests: [ { data, - protocol: "openid4vp", + protocol: "openid4vp-v1-unsigned", }, ], }, @@ -206,7 +206,7 @@ promise_test(async (t) => { const abortController = new AbortController(); const { signal } = abortController; - const options = makeGetOptions("openid4vp"); + const options = makeGetOptions("openid4vp-v1-unsigned"); options.signal = signal; await test_driver.bless("user activation"); const promise = promise_rejects_dom( @@ -225,7 +225,7 @@ abort: "after", action: "get", needsActivation: true, - options: makeGetOptions("openid4vp"), + options: makeGetOptions("openid4vp-v1-signed"), }); assert_equals(result.constructor, "DOMException"); assert_equals(result.name, "AbortError"); @@ -252,7 +252,7 @@ promise_test(async t => { ]; for (const badValue of throwingValues) { - const options = makeGetOptions("openid4vp"); + const options = makeGetOptions("openid4vp-v1-multisigned"); options.digital.requests[0].data = badValue; await promise_rejects_js( diff --git a/testing/web-platform/tests/digital-credentials/non-fully-active.https.html b/testing/web-platform/tests/digital-credentials/non-fully-active.https.html @@ -71,7 +71,7 @@ let iframe = await createIframe(); const DOMExceptionCtor = iframe.contentWindow.DOMException; let stolenNavigator = iframe.contentWindow.navigator; - const request = makeGetOptions("openid4vp"); + const request = makeGetOptions("openid4vp-v1-unsigned"); await test_driver.bless("User activation", null, iframe.contentWindow); await iframe.focus(); const p = promise_rejects_dom( diff --git a/testing/web-platform/tests/digital-credentials/support/helper.js b/testing/web-platform/tests/digital-credentials/support/helper.js @@ -38,7 +38,9 @@ function _makeOptionsInternal(requestsInputArray, mediation, requestMapping) { const allMappings = { get: { - "openid4vp": () => makeOID4VPDict(), + "openid4vp-v1-unsigned": () => makeOID4VPDict("openid4vp-v1-unsigned"), + "openid4vp-v1-signed": () => makeOID4VPDict("openid4vp-v1-signed"), + "openid4vp-v1-multisigned": () => makeOID4VPDict("openid4vp-v1-multisigned"), "default": () => makeDigitalCredentialGetRequest(undefined, undefined), }, create: { @@ -96,7 +98,7 @@ function _makeOptionsUnified(type, requestsToUse, mediation) { /** * Creates options for getting credentials. * @export - * @param {string | string[]} [requestsToUse] - Request types ('default', 'openid4vp', or an array). Defaults to ['default']. + * @param {string | string[]} [requestsToUse] - Request types ('default', 'openid4vp-v1-unsigned', 'openid4vp-v1-signed', 'openid4vp-v1-multisigned', or an array). Defaults to ['default']. * @param {string} [mediation="required"] - Credential mediation requirement ("required", "optional", "silent"). * @returns {{ digital: { requests: any[] }, mediation: string }} */ @@ -133,10 +135,11 @@ function makeDigitalCredentialGetRequest(protocol = "protocol", data = {}) { /** * Representation of an OpenID4VP request. * + * @param {string} identifier * @returns {DigitalCredentialGetRequest} **/ -function makeOID4VPDict() { - return makeDigitalCredentialGetRequest("openid4vp", { +function makeOID4VPDict(identifier = "openid4vp-v1-unsigned") { + return makeDigitalCredentialGetRequest(identifier, { // Canonical example of an OpenID4VP request coming soon. }); } diff --git a/testing/web-platform/tests/digital-credentials/user-activation.https.html b/testing/web-platform/tests/digital-credentials/user-activation.https.html @@ -14,7 +14,7 @@ navigator.userActivation.isActive, "User activation should not be active" ); - const options = makeGetOptions("openid4vp"); + const options = makeGetOptions("openid4vp-v1-unsigned"); await promise_rejects_dom( t, "NotAllowedError", @@ -25,7 +25,7 @@ promise_test(async (t) => { await test_driver.bless(); const abort = new AbortController(); - const options = makeGetOptions("openid4vp"); + const options = makeGetOptions("openid4vp-v1-unsigned"); options.signal = abort.signal; assert_true( navigator.userActivation.isActive,