servo/tests/wpt/meta/WebCryptoAPI/generateKey
Kingsley Yung f3d5617349
script: Check whether the generated crypto key has empty usages (#39328)
The WebCryptoAPI spec requires that when we generate crypto keys by the
generateKey method of SubtleCrypto interface we have to check whether
the usages is empty. If the usages is empty, throw a SyntaxError.

FYI, Step 9 of
https://w3c.github.io/webcrypto/#SubtleCrypto-method-generateKey

We have not yet implemented this logic, and this patch implements it.

Testing: Pass WPT tests that were expected to fail.

---------

Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
2025-09-16 17:23:42 +00:00
..
failures_ECDH.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
failures_ECDSA.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
failures_Ed448.tentative.https.any.js.ini Sync WPT with upstream (27-07-2025) (#38296) 2025-07-27 01:45:05 +00:00
failures_Ed25519.https.any.js.ini Sync WPT with upstream (20-07-2025) (#38178) 2025-07-20 15:11:10 +00:00
failures_RSA-OAEP.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
failures_RSA-PSS.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
failures_RSASSA-PKCS1-v1_5.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
failures_X448.tentative.https.any.js.ini Sync WPT with upstream (27-07-2025) (#38296) 2025-07-27 01:45:05 +00:00
failures_X25519.https.any.js.ini Sync WPT with upstream (20-07-2025) (#38178) 2025-07-20 15:11:10 +00:00
successes_ECDH.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
successes_ECDSA.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
successes_Ed448.tentative.https.any.js.ini Sync WPT with upstream (27-07-2025) (#38296) 2025-07-27 01:45:05 +00:00
successes_Ed25519.https.any.js.ini Sync WPT with upstream (20-07-2025) (#38178) 2025-07-20 15:11:10 +00:00
successes_HMAC.https.any.js.ini Implement HMAC key generation (#34278) 2024-11-18 17:28:24 +00:00
successes_RSA-OAEP.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
successes_RSA-PSS.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
successes_RSASSA-PKCS1-v1_5.https.any.js.ini crypto: Begin SubtleCrypto implementation (#33628) 2024-10-08 03:51:08 +00:00
successes_X448.tentative.https.any.js.ini Sync WPT with upstream (27-07-2025) (#38296) 2025-07-27 01:45:05 +00:00
successes_X25519.https.any.js.ini Sync WPT with upstream (20-07-2025) (#38178) 2025-07-20 15:11:10 +00:00