Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Digital Credentials: test create and get #46642

Merged
merged 13 commits into from
Aug 20, 2024
Merged

Digital Credentials: test create and get #46642

merged 13 commits into from
Aug 20, 2024

Conversation

marcoscaceres
Copy link
Contributor

@marcoscaceres marcoscaceres commented Jun 6, 2024

Closes WICG/digital-credentials#118

Creates a spec compliant set of test case and adds a more robust/flexible cross-origin testing framework:

  • helper.js
  • iframe.html

Removes/refactors the old "digital-credentials/digital-credentials.tentative.https.html", as these were not spec compliant.

Adds TypeScript types, for better workflow in VS Code, etc.

@wpt-pr-bot
Copy link
Collaborator

There are no reviewers for this pull request besides its author. Please reach out on the chat room to get help with this. Thank you!

digital-credentials/identity-get.tentative.https.html Outdated Show resolved Hide resolved
let request = buildValidNavigatorIdentityRequest();
let credential = await requestIdentityWithActivation(test_driver, request);
assert_equals("urn:openid.net:oid4vp", credential.protocol);
assert_equals("fake_test_token", credential.data);

Choose a reason for hiding this comment

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

It is a little unfortunate that we are removing this test, since it is what's helping us avoid regressions. Why does this need to be removed?

Copy link
Contributor Author

@marcoscaceres marcoscaceres Jun 13, 2024

Choose a reason for hiding this comment

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

These don't adhere to the spec. For example, "urn:openid.net:oid4vp" is not a thing that we have settled on and, per spec, it's impossible to get a credential without the user interacting with the credential selection sheet (hence the promise would never resolve with a credential).

We need a separate WebDriver API that can vend credentials if we want something like this.

Obviously, the test would be fine an internal Chrome unit test, but it's not something that helps us here with interop.

Make sense?

Copy link

@samuelgoto samuelgoto Jun 21, 2024

Choose a reason for hiding this comment

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

For example, "urn:openid.net:oid4vp" is not a thing that we have settled on

The protocol is a DOMString rather than an enum, so I wasn't thinking that we would necessarily need to settle on its value.

It is also what's being used by the OpenID4VP pull request, so a reasonable approximation of what I think we (?) would want to cover:

https://github.com/openid/OpenID4VP/pull/155/files#diff-3118c9756a1d7b361bb53af8bd9d65666476a27cfeeced56c47a5dccc38eac55R1542

We need a separate WebDriver API that can vend credentials if we want something like this.

I generally agree that we need a WebDriver API, but that is fairly involved. Any chance there is a way that we can keep this test without going all the way to a WebDriver API?

Obviously, the test would be fine an internal Chrome unit test, but it's not something that helps us here with interop.

That's a reasonable compromise to me too: moving this specific test to a chrome-specific unit test as we improve the web platform tests infrastructure for the digital credential API.

chromium-wpt-export-bot pushed a commit that referenced this pull request Jun 14, 2024
This CL renames the digital-credential WPT files. The intention of this
CL is to make #46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
chromium-wpt-export-bot pushed a commit that referenced this pull request Jun 14, 2024
This CL renames the digital-credential WPT files. The intention of this
CL is to make #46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631578
Commit-Queue: Peter Kotwicz <[email protected]>
Reviewed-by: Nicolás Peña <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1315269}
chromium-wpt-export-bot pushed a commit that referenced this pull request Jun 14, 2024
This CL renames the digital-credential WPT files. The intention of this
CL is to make #46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631578
Commit-Queue: Peter Kotwicz <[email protected]>
Reviewed-by: Nicolás Peña <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1315269}
Copy link
Contributor

@pkotwicz pkotwicz left a comment

Choose a reason for hiding this comment

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

Added some review comments. Please rebase this CL with tip of tree.

digital-credentials/dc-types.ts Outdated Show resolved Hide resolved
digital-credentials/support/helper.js Outdated Show resolved Hide resolved
digital-credentials/identity-get.tentative.https.html Outdated Show resolved Hide resolved
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Jun 18, 2024
…estonly

Automatic update from web-platform-tests
Rename digital-credential WPT files

This CL renames the digital-credential WPT files. The intention of this
CL is to make web-platform-tests/wpt#46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631578
Commit-Queue: Peter Kotwicz <[email protected]>
Reviewed-by: Nicolás Peña <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1315269}

--

wpt-commits: b98b066d2f5ac7966fb5e2fffedc5f56d8e590dd
wpt-pr: 46758
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Jun 19, 2024
…estonly

Automatic update from web-platform-tests
Rename digital-credential WPT files

This CL renames the digital-credential WPT files. The intention of this
CL is to make web-platform-tests/wpt#46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631578
Commit-Queue: Peter Kotwicz <pkotwiczchromium.org>
Reviewed-by: Nicolás Peña <npmchromium.org>
Cr-Commit-Position: refs/heads/main{#1315269}

--

wpt-commits: b98b066d2f5ac7966fb5e2fffedc5f56d8e590dd
wpt-pr: 46758

UltraBlame original commit: b2d5a8c4a9170a29373da4bf0ee937741373550f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Jun 19, 2024
…estonly

Automatic update from web-platform-tests
Rename digital-credential WPT files

This CL renames the digital-credential WPT files. The intention of this
CL is to make web-platform-tests/wpt#46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631578
Commit-Queue: Peter Kotwicz <pkotwiczchromium.org>
Reviewed-by: Nicolás Peña <npmchromium.org>
Cr-Commit-Position: refs/heads/main{#1315269}

--

wpt-commits: b98b066d2f5ac7966fb5e2fffedc5f56d8e590dd
wpt-pr: 46758

UltraBlame original commit: b2d5a8c4a9170a29373da4bf0ee937741373550f
i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Jun 21, 2024
…estonly

Automatic update from web-platform-tests
Rename digital-credential WPT files

This CL renames the digital-credential WPT files. The intention of this
CL is to make web-platform-tests/wpt#46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631578
Commit-Queue: Peter Kotwicz <[email protected]>
Reviewed-by: Nicolás Peña <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1315269}

--

wpt-commits: b98b066d2f5ac7966fb5e2fffedc5f56d8e590dd
wpt-pr: 46758
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Jun 24, 2024
…estonly

Automatic update from web-platform-tests
Rename digital-credential WPT files

This CL renames the digital-credential WPT files. The intention of this
CL is to make web-platform-tests/wpt#46642
easier to review as the renamed files are showing up as added+deleted in
Github.

BUG=5622820

Change-Id: Ia623539e5bc373e523d9ba27c930b4dab076be8e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5631578
Commit-Queue: Peter Kotwicz <[email protected]>
Reviewed-by: Nicolás Peña <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1315269}

--

wpt-commits: b98b066d2f5ac7966fb5e2fffedc5f56d8e590dd
wpt-pr: 46758
@pkotwicz
Copy link
Contributor

Let me know when you are ready for another round of code review :)

@marcoscaceres
Copy link
Contributor Author

@pkotwicz, I think these should be good to go now. Appreciate another review.

digital-credentials/identity-get.tentative.https.html Outdated Show resolved Hide resolved
digital-credentials/get-user-activation.https.html Outdated Show resolved Hide resolved
digital-credentials/support/helper.js Show resolved Hide resolved
digital-credentials/support/helper.js Show resolved Hide resolved
digital-credentials/support/iframe.html Outdated Show resolved Hide resolved
digital-credentials/dc-types.ts Outdated Show resolved Hide resolved
digital-credentials/support/iframe.html Outdated Show resolved Hide resolved
@pkotwicz
Copy link
Contributor

pkotwicz commented Aug 2, 2024

Wanted to apologize for the long delay in the code review. My github e-mail settings were screwed up

@pkotwicz
Copy link
Contributor

pkotwicz commented Aug 7, 2024

Let me know when you want another review on this CL

@marcoscaceres
Copy link
Contributor Author

@pkotwicz, sorry for the slow churn on this... implementing in WebKit in parallel, so just coming back to this now.

Can you please take another look, also at #47662 ?

Copy link
Contributor

@pkotwicz pkotwicz left a comment

Choose a reason for hiding this comment

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

Approval with nits

digital-credentials/identity-get.tentative.https.html Outdated Show resolved Hide resolved
digital-credentials/support/helper.js Show resolved Hide resolved
digital-credentials/support/helper.js Show resolved Hide resolved
@marcoscaceres marcoscaceres enabled auto-merge (squash) August 20, 2024 01:58
@marcoscaceres marcoscaceres merged commit f4e5691 into master Aug 20, 2024
19 checks passed
@marcoscaceres marcoscaceres deleted the dc-create branch August 20, 2024 02:13
Copy link

@samuelgoto samuelgoto left a comment

Choose a reason for hiding this comment

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

LGTM++

Westbrook pushed a commit to Westbrook/wpt that referenced this pull request Aug 21, 2024
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.

Web Platform Tests: refactoring digitial-credentials.tentative.https.html
6 participants