Skip to content

Digital Credentials: Add userAgentAllowsProtocol method#53089

Merged
mohamedamir merged 6 commits into
web-platform-tests:masterfrom
timcappalli:master
Jun 26, 2025
Merged

Digital Credentials: Add userAgentAllowsProtocol method#53089
mohamedamir merged 6 commits into
web-platform-tests:masterfrom
timcappalli:master

Conversation

@timcappalli

Copy link
Copy Markdown
Contributor

Adds test for w3c-fedid/digital-credentials#221

Also updates spec links after WICG to WG move and adds Tim as suggested reviewer.

Comment thread digital-credentials/digital-credential-client-allows-protocol.https.html Outdated
<script type="module">

promise_test(async (t) => {
const result = DigitalCredential.clientAllowsProtocol('protocol.banana');

@marcoscaceres marcoscaceres Jun 12, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should have a bunch of failure cases. For example:

const invalidIdentifiers = ["", " ", "a b", "a,b", "AB", "a.B", "a.b", " foo-bar", " foo-bar ", "foo-bar "];

for (const invalidIdentifier of invalidIdentifiers) {
   const result = DigitalCredential.allowsProtocol(invalidIdentifier);
   assert_equals(result, false, `Incorrect result for ${invalidIdentifier}.`);
}

@marcoscaceres marcoscaceres changed the title Digital Credentials: Add clientAllowsProtocol method Digital Credentials: Add allowsProtocol method Jun 12, 2025
Comment thread digital-credentials/digital-credential-client-allows-protocol.https.html Outdated
@marcoscaceres

Copy link
Copy Markdown
Contributor

Please make sure to update the commit message 🙏

Comment thread digital-credentials/digital-credential-client-allows-protocol.https.html Outdated
Comment thread digital-credentials/digital-credential-client-allows-protocol.https.html Outdated
@mohamedamir mohamedamir changed the title Digital Credentials: Add allowsProtocol method Digital Credentials: Add userAgentAllowsProtocol method Jun 26, 2025

@mohamedamir mohamedamir left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!
Thank you!

@mohamedamir mohamedamir merged commit 3fa4612 into web-platform-tests:master Jun 26, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants