summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/crypto/00_crypto.js4
-rw-r--r--tests/wpt/runner/expectation.json6
2 files changed, 6 insertions, 4 deletions
diff --git a/ext/crypto/00_crypto.js b/ext/crypto/00_crypto.js
index 8f9c431ed..80a2e11c7 100644
--- a/ext/crypto/00_crypto.js
+++ b/ext/crypto/00_crypto.js
@@ -1131,10 +1131,10 @@ class SubtleCrypto {
* @param {number | null} length
* @returns {Promise<ArrayBuffer>}
*/
- async deriveBits(algorithm, baseKey, length) {
+ async deriveBits(algorithm, baseKey, length = null) {
webidl.assertBranded(this, SubtleCryptoPrototype);
const prefix = "Failed to execute 'deriveBits' on 'SubtleCrypto'";
- webidl.requiredArguments(arguments.length, 3, prefix);
+ webidl.requiredArguments(arguments.length, 2, prefix);
algorithm = webidl.converters.AlgorithmIdentifier(
algorithm,
prefix,
diff --git a/tests/wpt/runner/expectation.json b/tests/wpt/runner/expectation.json
index 74eef8159..cd212f9c4 100644
--- a/tests/wpt/runner/expectation.json
+++ b/tests/wpt/runner/expectation.json
@@ -909,10 +909,12 @@
"historical.any.html": false,
"historical.any.worker.html": false,
"idlharness.https.any.html": [
- "Window interface: attribute crypto"
+ "Window interface: attribute crypto",
+ "SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)"
],
"idlharness.https.any.worker.html": [
- "WorkerGlobalScope interface: attribute crypto"
+ "WorkerGlobalScope interface: attribute crypto",
+ "SubtleCrypto interface: operation deriveBits(AlgorithmIdentifier, CryptoKey, unsigned long)"
],
"import_export": {
"ec_importKey.https.any.html": [