LibWeb: Set algorithm length for HMAC key generation

This assignment was missing from the spec, but has been fixed since
https://github.com/w3c/webcrypto/pull/394.

Also add relevant WPT tests.
This commit is contained in:
devgianlu 2024-12-26 20:09:58 +01:00 committed by Andreas Kling
commit f5d3d6a7d4
Notes: github-actions[bot] 2025-01-02 10:38:45 +00:00
4 changed files with 230 additions and 5 deletions

View file

@ -0,0 +1,18 @@
<!doctype html>
<meta charset=utf-8>
<title>WebCryptoAPI: generateKey() Successful Calls</title>
<meta name="timeout" content="long">
<script>
self.GLOBAL = {
isWindow: function() { return true; },
isWorker: function() { return false; },
isShadowRealm: function() { return false; },
};
</script>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../util/helpers.js"></script>
<script src="../../common/subset-tests.js"></script>
<script src="successes.js"></script>
<div id=log></div>
<script src="../../WebCryptoAPI/generateKey/successes_HMAC.https.any.js"></script>

View file

@ -0,0 +1,6 @@
// META: title=WebCryptoAPI: generateKey() Successful Calls
// META: timeout=long
// META: script=../util/helpers.js
// META: script=/common/subset-tests.js
// META: script=successes.js
run_test(["HMAC"]);