-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Add Web Platform Tests for Digital Credentials Issuance API #51492
base: master
Are you sure you want to change the base?
Add Web Platform Tests for Digital Credentials Issuance API #51492
Conversation
}, "Permissions-Policy is by default 'self' for get()."); | ||
|
||
promise_test(async (test) => { | ||
await test_driver.bless("user activation"); | ||
await promise_rejects_js( | ||
test, | ||
TypeError, | ||
navigator.credentials.create(makeCreateOptions([])) | ||
); | ||
|
||
await test_feature_availability({ | ||
feature_description: "Digital Credential API", | ||
test, | ||
src: create_same_origin_src, | ||
expect_feature_available: expect_feature_available_default, | ||
is_promise_test: true, | ||
}); | ||
|
||
await test_feature_availability({ | ||
feature_description: "Digital Credential API", | ||
test, | ||
src: create_cross_origin_src, | ||
expect_feature_available: expect_feature_unavailable_default, | ||
feature_name: "digital-credentials-create", | ||
is_promise_test: true, | ||
}); | ||
}, "Permissions-Policy is by default 'self' for create()."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we going to introduce a permission policy for issuance too?
I assumed yes in this PR.
Can also come at a later point if this isn't the case!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, exactly... it's the "digital-credentials-create".
policy: `digital-credentials-get ${hostInfo.HTTPS_REMOTE_ORIGIN}`, | ||
crossOrigin: true, | ||
expectIsAllowed: true, | ||
}, | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I feel we should split this into two tests... I like the addition of action. That's a good idea.
const { HTTPS_REMOTE_ORIGIN } = get_host_info(); | ||
const same_origin_src = | ||
const get_same_origin_src = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should split this into two files, tbh... otherwise it's going to get confusing if the file continues to grow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from splitting the files, the rest all looks great.
This PR adds web platform tests for Digital Credentials Issuance API (.create()) that are aligned with the set of test we have for the presentation API (.get())
tests for WICG/digital-credentials#204