From 8c454287608757c9729b59cfe960fd16a3561808 Mon Sep 17 00:00:00 2001 From: Ashwin Naren Date: Sat, 20 Sep 2025 00:24:32 -0700 Subject: [PATCH] Enable credential management wpt tests (#39327) Enabling them early to prevent intermittent failures. Fixes: Partially #38788 Signed-off-by: Ashwin Naren --- tests/wpt/include.ini | 2 + tests/wpt/meta/__dir__.ini | 1 + ...ialscontainer-create-basics.https.html.ini | 30 ++++++ ...tialscontainer-frame-basics.https.html.ini | 3 + ...entialscontainer-get-basics.https.html.ini | 12 +++ ...ainer-prevent-silent-access.https.html.ini | 3 + ...edcredential-framed-get.sub.https.html.ini | 2 + .../idlharness.https.window.js.ini | 93 +++++++++++++++++++ .../otpcredential-get-basics.https.html.ini | 18 ++++ .../otpcredential-iframe.https.html.ini | 9 ++ .../otpcredential-store.https.html.ini | 3 + ...rdcredential-framed-get.sub.https.html.ini | 15 +++ 12 files changed, 191 insertions(+) create mode 100644 tests/wpt/meta/credential-management/credentialscontainer-create-basics.https.html.ini create mode 100644 tests/wpt/meta/credential-management/credentialscontainer-frame-basics.https.html.ini create mode 100644 tests/wpt/meta/credential-management/credentialscontainer-get-basics.https.html.ini create mode 100644 tests/wpt/meta/credential-management/credentialscontainer-prevent-silent-access.https.html.ini create mode 100644 tests/wpt/meta/credential-management/federatedcredential-framed-get.sub.https.html.ini create mode 100644 tests/wpt/meta/credential-management/idlharness.https.window.js.ini create mode 100644 tests/wpt/meta/credential-management/otpcredential-get-basics.https.html.ini create mode 100644 tests/wpt/meta/credential-management/otpcredential-iframe.https.html.ini create mode 100644 tests/wpt/meta/credential-management/otpcredential-store.https.html.ini create mode 100644 tests/wpt/meta/credential-management/passwordcredential-framed-get.sub.https.html.ini diff --git a/tests/wpt/include.ini b/tests/wpt/include.ini index 91b413682b0..436cc59d51b 100644 --- a/tests/wpt/include.ini +++ b/tests/wpt/include.ini @@ -21,6 +21,8 @@ skip: true skip: true [cors] skip: false +[credential-management] + skip: false [css] skip: false [css-anchor-position] diff --git a/tests/wpt/meta/__dir__.ini b/tests/wpt/meta/__dir__.ini index 53afe574633..ebe97c50cb0 100644 --- a/tests/wpt/meta/__dir__.ini +++ b/tests/wpt/meta/__dir__.ini @@ -1,5 +1,6 @@ prefs: [ "dom_adoptedstylesheet_enabled:true", + "dom_credential_management_enabled:true", "dom_indexeddb_enabled:true", "dom_serviceworker_enabled:true", "dom_testutils_enabled:true", diff --git a/tests/wpt/meta/credential-management/credentialscontainer-create-basics.https.html.ini b/tests/wpt/meta/credential-management/credentialscontainer-create-basics.https.html.ini new file mode 100644 index 00000000000..6f7893a21d2 --- /dev/null +++ b/tests/wpt/meta/credential-management/credentialscontainer-create-basics.https.html.ini @@ -0,0 +1,30 @@ +[credentialscontainer-create-basics.https.html] + [navigator.credentials.create() with valid PasswordCredentialData] + expected: FAIL + + [navigator.credentials.create() with valid HTMLFormElement] + expected: FAIL + + [navigator.credentials.create() with valid FederatedCredentialData] + expected: FAIL + + [navigator.credentials.create() with bogus federated data] + expected: FAIL + + [navigator.credentials.create() with bogus publicKey data] + expected: FAIL + + [navigator.credentials.create() with both PasswordCredentialData and FederatedCredentialData] + expected: FAIL + + [navigator.credentials.create() with bogus federated and publicKey data] + expected: FAIL + + [navigator.credentials.create() aborted with custom reason] + expected: FAIL + + [navigator.credentials.create() aborted with different objects] + expected: FAIL + + [navigator.credentials.create() rejects when aborted after the promise creation] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/credentialscontainer-frame-basics.https.html.ini b/tests/wpt/meta/credential-management/credentialscontainer-frame-basics.https.html.ini new file mode 100644 index 00000000000..83370ef640e --- /dev/null +++ b/tests/wpt/meta/credential-management/credentialscontainer-frame-basics.https.html.ini @@ -0,0 +1,3 @@ +[credentialscontainer-frame-basics.https.html] + [navigator.credentials should be undefined in documents generated from `data:` URLs.] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/credentialscontainer-get-basics.https.html.ini b/tests/wpt/meta/credential-management/credentialscontainer-get-basics.https.html.ini new file mode 100644 index 00000000000..f2359340b5c --- /dev/null +++ b/tests/wpt/meta/credential-management/credentialscontainer-get-basics.https.html.ini @@ -0,0 +1,12 @@ +[credentialscontainer-get-basics.https.html] + [Calling navigator.credentials.get() without a valid matching interface.] + expected: FAIL + + [navigator.credentials.get() aborted with custom reason] + expected: FAIL + + [navigator.credentials.get() aborted with different objects] + expected: FAIL + + [navigator.credentials.get() rejects when aborted after the promise creation] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/credentialscontainer-prevent-silent-access.https.html.ini b/tests/wpt/meta/credential-management/credentialscontainer-prevent-silent-access.https.html.ini new file mode 100644 index 00000000000..836c2fbd46f --- /dev/null +++ b/tests/wpt/meta/credential-management/credentialscontainer-prevent-silent-access.https.html.ini @@ -0,0 +1,3 @@ +[credentialscontainer-prevent-silent-access.https.html] + [navigator.credentials.preventSilentAccess() resolves with undefined.] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/federatedcredential-framed-get.sub.https.html.ini b/tests/wpt/meta/credential-management/federatedcredential-framed-get.sub.https.html.ini new file mode 100644 index 00000000000..118e7b092b2 --- /dev/null +++ b/tests/wpt/meta/credential-management/federatedcredential-framed-get.sub.https.html.ini @@ -0,0 +1,2 @@ +[federatedcredential-framed-get.sub.https.html] + expected: ERROR diff --git a/tests/wpt/meta/credential-management/idlharness.https.window.js.ini b/tests/wpt/meta/credential-management/idlharness.https.window.js.ini new file mode 100644 index 00000000000..d7d20a5985e --- /dev/null +++ b/tests/wpt/meta/credential-management/idlharness.https.window.js.ini @@ -0,0 +1,93 @@ +[idlharness.https.window.html] + [PasswordCredential interface: attribute name] + expected: FAIL + + [PasswordCredential interface: attribute iconURL] + expected: FAIL + + [PasswordCredential must be primary interface of passwordCredential] + expected: FAIL + + [Stringification of passwordCredential] + expected: FAIL + + [PasswordCredential interface: passwordCredential must inherit property "password" with the proper type] + expected: FAIL + + [PasswordCredential interface: passwordCredential must inherit property "name" with the proper type] + expected: FAIL + + [PasswordCredential interface: passwordCredential must inherit property "iconURL" with the proper type] + expected: FAIL + + [Credential interface: passwordCredential must inherit property "id" with the proper type] + expected: FAIL + + [Credential interface: passwordCredential must inherit property "type" with the proper type] + expected: FAIL + + [Credential interface: passwordCredential must inherit property "isConditionalMediationAvailable()" with the proper type] + expected: FAIL + + [Credential interface: passwordCredential must inherit property "willRequestConditionalCreation()" with the proper type] + expected: FAIL + + [FederatedCredential interface: existence and properties of interface object] + expected: FAIL + + [FederatedCredential interface object length] + expected: FAIL + + [FederatedCredential interface object name] + expected: FAIL + + [FederatedCredential interface: existence and properties of interface prototype object] + expected: FAIL + + [FederatedCredential interface: existence and properties of interface prototype object's "constructor" property] + expected: FAIL + + [FederatedCredential interface: existence and properties of interface prototype object's @@unscopables property] + expected: FAIL + + [FederatedCredential interface: attribute provider] + expected: FAIL + + [FederatedCredential interface: attribute protocol] + expected: FAIL + + [FederatedCredential interface: attribute name] + expected: FAIL + + [FederatedCredential interface: attribute iconURL] + expected: FAIL + + [FederatedCredential must be primary interface of federatedCredential] + expected: FAIL + + [Stringification of federatedCredential] + expected: FAIL + + [FederatedCredential interface: federatedCredential must inherit property "provider" with the proper type] + expected: FAIL + + [FederatedCredential interface: federatedCredential must inherit property "protocol" with the proper type] + expected: FAIL + + [FederatedCredential interface: federatedCredential must inherit property "name" with the proper type] + expected: FAIL + + [FederatedCredential interface: federatedCredential must inherit property "iconURL" with the proper type] + expected: FAIL + + [Credential interface: federatedCredential must inherit property "id" with the proper type] + expected: FAIL + + [Credential interface: federatedCredential must inherit property "type" with the proper type] + expected: FAIL + + [Credential interface: federatedCredential must inherit property "isConditionalMediationAvailable()" with the proper type] + expected: FAIL + + [Credential interface: federatedCredential must inherit property "willRequestConditionalCreation()" with the proper type] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/otpcredential-get-basics.https.html.ini b/tests/wpt/meta/credential-management/otpcredential-get-basics.https.html.ini new file mode 100644 index 00000000000..d398316161b --- /dev/null +++ b/tests/wpt/meta/credential-management/otpcredential-get-basics.https.html.ini @@ -0,0 +1,18 @@ +[otpcredential-get-basics.https.html] + [Basic usage] + expected: FAIL + + [Handle multiple requests in different order.] + expected: FAIL + + [Handle multiple requests with success and error.] + expected: FAIL + + [Deal with cancelled requests] + expected: FAIL + + [Should abort request] + expected: FAIL + + [Should abort request with reason] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/otpcredential-iframe.https.html.ini b/tests/wpt/meta/credential-management/otpcredential-iframe.https.html.ini new file mode 100644 index 00000000000..88b9f08ca1a --- /dev/null +++ b/tests/wpt/meta/credential-management/otpcredential-iframe.https.html.ini @@ -0,0 +1,9 @@ +[otpcredential-iframe.https.html] + [Test OTPCredential enabled in same origin iframes] + expected: FAIL + + [OTPCredential enabled in cross origin iframes with permissions policy] + expected: FAIL + + [OTPCredential disabled in cross origin iframes without permissions policy] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/otpcredential-store.https.html.ini b/tests/wpt/meta/credential-management/otpcredential-store.https.html.ini new file mode 100644 index 00000000000..fc6c19ca218 --- /dev/null +++ b/tests/wpt/meta/credential-management/otpcredential-store.https.html.ini @@ -0,0 +1,3 @@ +[otpcredential-store.https.html] + [navigator.credentials.store() with an otp credential returns NotSupportedError] + expected: FAIL diff --git a/tests/wpt/meta/credential-management/passwordcredential-framed-get.sub.https.html.ini b/tests/wpt/meta/credential-management/passwordcredential-framed-get.sub.https.html.ini new file mode 100644 index 00000000000..1c9da971341 --- /dev/null +++ b/tests/wpt/meta/credential-management/passwordcredential-framed-get.sub.https.html.ini @@ -0,0 +1,15 @@ +[passwordcredential-framed-get.sub.https.html] + [Cross-origin IFrame throws 'NotAllowedError'.] + expected: FAIL + + [Same-origin IFrame in same-origin IFrame does not throw.] + expected: FAIL + + [Same-origin IFrame in same-origin IFrame throws 'NotAllowedError'.] + expected: FAIL + + [Cross-origin IFrame in same-origin IFrame throws 'NotAllowedError'.] + expected: FAIL + + [Cross-origin IFrame in same-cross-origin throws 'NotAllowedError'.] + expected: FAIL