summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/credential-management/digital-identity.https.html
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 05:35:37 +0000
commita90a5cba08fdf6c0ceb95101c275108a152a3aed (patch)
tree532507288f3defd7f4dcf1af49698bcb76034855 /testing/web-platform/tests/credential-management/digital-identity.https.html
parentAdding debian version 126.0.1-1. (diff)
downloadfirefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.tar.xz
firefox-a90a5cba08fdf6c0ceb95101c275108a152a3aed.zip
Merging upstream version 127.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/credential-management/digital-identity.https.html')
-rw-r--r--testing/web-platform/tests/credential-management/digital-identity.https.html58
1 files changed, 0 insertions, 58 deletions
diff --git a/testing/web-platform/tests/credential-management/digital-identity.https.html b/testing/web-platform/tests/credential-management/digital-identity.https.html
index b2f36d21ee..8ae9caa002 100644
--- a/testing/web-platform/tests/credential-management/digital-identity.https.html
+++ b/testing/web-platform/tests/credential-management/digital-identity.https.html
@@ -17,31 +17,6 @@ const host = get_host_info();
const basePath = window.location.pathname.replace(/\/[^\/]*$/, '/');
const remoteBaseURL = host.HTTPS_REMOTE_ORIGIN + basePath;
-// Builds valid digital identity request for navigator.credentials.get() API.
-function buildValidNavigatorCredentialsRequest() {
- return {
- identity: {
- providers: [{
- holder: {
- selector: {
- format: ['mdoc'],
- doctype: 'org.iso.18013.5.1.mDL',
- fields: [
- 'org.iso.18013.5.1.family_name',
- 'org.iso.18013.5.1.portrait',
- ]
- },
- params: {
- nonce: '1234',
- readerPublicKey: 'test_reader_public_key',
- extraParamAsNeededByDigitalCredentials: true,
- },
- },
- }],
- },
- };
-}
-
async function createIframeAndWaitForMessage(test, iframeUrl) {
const messageWatcher = new EventWatcher(test, window, "message");
var iframe = document.createElement("iframe");
@@ -54,39 +29,6 @@ async function createIframeAndWaitForMessage(test, iframeUrl) {
// Requires browser to have mode where OS-presented digital-identity-prompt is
// bypassed in favour of returning "fake_test_token" directly.
promise_test(async t => {
- const {token} = await navigator.credentials.get(buildValidNavigatorCredentialsRequest());
- assert_equals("fake_test_token", token);
-}, "navigator.credentials.get() API works in toplevel frame.");
-
-promise_test(async t => {
- let request = buildValidNavigatorCredentialsRequest();
- request.identity.providers = undefined;
-
- await promise_rejects_js(t, TypeError, navigator.credentials.get(request));
-}, "navigator.credentials.get() API fails if IdentityCredentialRequestOptions::providers is not specified.");
-
-promise_test(async t => {
- let request = buildValidNavigatorCredentialsRequest();
- request.identity.providers = [];
-
- await promise_rejects_js(t, TypeError, navigator.credentials.get(request));
-}, "navigator.credentials.get() API fails if there are no providers.");
-
-promise_test(async t => {
- let request = buildValidNavigatorCredentialsRequest();
- let providerCopy = structuredClone(request.identity.providers[0]);
- request.identity.providers.push(providerCopy);
- await promise_rejects_js(t, TypeError, navigator.credentials.get(request));
-}, "navigator.credentials.get() API fails if there is more than one provider.");
-
-promise_test(async t => {
- let request = buildValidNavigatorCredentialsRequest();
- request.identity.providers[0].holder = undefined;
-
- await promise_rejects_js(t, TypeError, navigator.credentials.get(request));
-}, "navigator.credentials.get() API fails if IdentityProviderConfig::holder is not specified.");
-
-promise_test(async t => {
let request = buildValidNavigatorIdentityRequest();
let credential = await navigator.identity.get(request);
assert_equals("urn:openid.net:oid4vp", credential.protocol);